aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-04-28 11:03:34 -0400
committerLuke <luke.pulverenti@gmail.com>2015-04-28 11:03:34 -0400
commit23da60856958e1a219cccafeb002ae182b3f812a (patch)
tree52dfd1706f6ae3c8a6d133a105cc09d07d470db1 /MediaBrowser.Server.Implementations/EntryPoints
parente14fa7d8e5b8c97eafec6670797958593e4506f8 (diff)
parent0442de79f4d2ad5d577cb7a5220386f23a7b3f12 (diff)
Merge pull request #1089 from MediaBrowser/dev
3.0.5597.0
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs27
1 files changed, 15 insertions, 12 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
index 3fa0df760..06cbb9317 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
@@ -75,7 +75,10 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private void Start()
{
_logger.Debug("Starting NAT discovery");
-
+ //NatUtility.EnabledProtocols = new List<NatProtocol>
+ //{
+ // NatProtocol.Pmp
+ //};
NatUtility.DeviceFound += NatUtility_DeviceFound;
// Mono.Nat does never rise this event. The event is there however it is useless.
@@ -88,7 +91,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
NatUtility.UnhandledException += NatUtility_UnhandledException;
NatUtility.StartDiscovery();
- _timer = new Timer(s => _createdRules = new List<string>(), null, TimeSpan.FromMinutes(3), TimeSpan.FromMinutes(3));
+ _timer = new Timer(s => _createdRules = new List<string>(), null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5));
_lastConfigIdentifier = GetConfigIdentifier();
@@ -97,17 +100,17 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
void NatUtility_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
- //var ex = e.ExceptionObject as Exception;
+ var ex = e.ExceptionObject as Exception;
- //if (ex == null)
- //{
- // _logger.Error("Unidentified error reported by Mono.Nat");
- //}
- //else
- //{
- // // Seeing some blank exceptions coming through here
- // _logger.ErrorException("Error reported by Mono.Nat: ", ex);
- //}
+ if (ex == null)
+ {
+ //_logger.Error("Unidentified error reported by Mono.Nat");
+ }
+ else
+ {
+ // Seeing some blank exceptions coming through here
+ //_logger.ErrorException("Error reported by Mono.Nat: ", ex);
+ }
}
void NatUtility_DeviceFound(object sender, DeviceEventArgs e)