diff options
| author | Michalis Adamidis <gsnerf@gsnerf.de> | 2014-08-30 02:05:33 +0200 |
|---|---|---|
| committer | Michalis Adamidis <gsnerf@gsnerf.de> | 2014-08-30 02:05:33 +0200 |
| commit | 7c5613fc51738cb3af1ce3e7ada9eb19a54b3aed (patch) | |
| tree | dfd23a717d87e1da776a74f9952a5fae8f215b4a /MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs | |
| parent | 5740a4c22d676d0050e875b0bd5455f5a303f5bd (diff) | |
| parent | 6a9dbf6ae85b4e7abcf06f7f29ef9d8b0b890876 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index 42191a2701..2d050d4a75 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -61,7 +61,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints // Mono.Nat does never rise this event. The event is there however it is useless. // You could remove it with no risk. - // NatUtility.DeviceLost += NatUtility_DeviceLost; + NatUtility.DeviceLost += NatUtility_DeviceLost; // it is hard to say what one should do when an unhandled exception is raised @@ -71,7 +71,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints _isStarted = true; - _timer = new Timer(s => _createdRules = new List<string>(), null, TimeSpan.FromHours(6), TimeSpan.FromHours(6)); + _timer = new Timer(s => _createdRules = new List<string>(), null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10)); } } @@ -123,7 +123,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints if (!_createdRules.Contains(address)) { _createdRules.Add(address); - + var info = _appHost.GetSystemInfo(); CreatePortMap(device, info.HttpServerPortNumber); @@ -141,11 +141,11 @@ namespace MediaBrowser.Server.Implementations.EntryPoints } // As I said before, this method will be never invoked. You can remove it. - //void NatUtility_DeviceLost(object sender, DeviceEventArgs e) - //{ - // var device = e.Device; - // _logger.Debug("NAT device lost: {0}", device.LocalAddress.ToString()); - //} + void NatUtility_DeviceLost(object sender, DeviceEventArgs e) + { + var device = e.Device; + _logger.Debug("NAT device lost: {0}", device.LocalAddress.ToString()); + } public void Dispose() { @@ -167,7 +167,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints // This is not a significant improvement NatUtility.StopDiscovery(); NatUtility.DeviceFound -= NatUtility_DeviceFound; - //NatUtility.DeviceLost -= NatUtility_DeviceLost; + NatUtility.DeviceLost -= NatUtility_DeviceLost; NatUtility.UnhandledException -= NatUtility_UnhandledException; } // Statements in try-block will no fail because StopDiscovery is a one-line |
