diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-31 15:22:07 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-31 15:22:07 -0400 |
| commit | e13fcb3cd42b67374621d7e02961e4bd335a235f (patch) | |
| tree | b6c440b02695534415def918fc67b73339d385a0 /MediaBrowser.Server.Implementations/EntryPoints | |
| parent | d5b7ed325e5930b30fd8ecf54088d1bccdd2e8ba (diff) | |
update sat/ip
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index c0c626438..a7e5396eb 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -31,20 +31,26 @@ namespace MediaBrowser.Server.Implementations.EntryPoints _appHost = appHost; _config = config; _ssdp = ssdp; + + _config.ConfigurationUpdated += _config_ConfigurationUpdated; } - public void Run() + private void _config_ConfigurationUpdated(object sender, EventArgs e) { - //NatUtility.Logger = new LogWriter(_logger); + } - if (_config.Configuration.EnableUPnP) - { - Discover(); - } + public void Run() + { + Discover(); } private async void Discover() { + if (!_config.Configuration.EnableUPnP) + { + return; + } + var discoverer = new NatDiscoverer(); var cancellationTokenSource = new CancellationTokenSource(10000); |
