소스 검색

update logging

Luke Pulverenti 7 년 전
부모
커밋
9707712d39
2개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 0
      Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
  2. 3 8
      Emby.Server.Implementations/Networking/NetworkManager.cs

+ 4 - 0
Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs

@@ -139,6 +139,10 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
             try
             {
                 stream.Seek(offset, SeekOrigin.End);
+            }
+            catch (IOException)
+            {
+
             }
             catch (ArgumentException)
             {

+ 3 - 8
Emby.Server.Implementations/Networking/NetworkManager.cs

@@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Networking
 
         public List<IpAddressInfo> GetLocalIpAddresses()
         {
-            const int cacheMinutes = 5;
+            const int cacheMinutes = 10;
 
             lock (_localIpAddressSyncLock)
             {
@@ -198,12 +198,6 @@ namespace Emby.Server.Implementations.Networking
             return Dns.GetHostAddressesAsync(hostName);
         }
 
-        private readonly List<NetworkInterfaceType> _validNetworkInterfaceTypes = new List<NetworkInterfaceType>
-        {
-            NetworkInterfaceType.Ethernet,
-            NetworkInterfaceType.Wireless80211
-        };
-
         private List<IPAddress> GetIPsDefault()
         {
             NetworkInterface[] interfaces;
@@ -227,7 +221,8 @@ namespace Emby.Server.Implementations.Networking
 
                 try
                 {
-                    Logger.Debug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus);
+                    // suppress logging because it might be causing nas device wake up
+                    //Logger.Debug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus);
 
                     var ipProperties = network.GetIPProperties();