aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-28 22:40:21 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-28 22:40:21 -0500
commit3510ef3d2beb810c87f8f3d52f95b95110e574d0 (patch)
treeb5ed7084d32c7f4420b26fad92aaee5e7c7f65c7 /MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
parent8ff5d4af47d9b4fd145206d8609c4894c4ace057 (diff)
reduce use of timers throughout the system
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
index a2ffa9aff..2b2c338dd 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
@@ -11,6 +11,7 @@ using System.IO;
using System.Net;
using System.Text;
using System.Threading;
+using MediaBrowser.Common.Threading;
namespace MediaBrowser.Server.Implementations.EntryPoints
{
@@ -21,7 +22,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private readonly IServerConfigurationManager _config;
private readonly ISsdpHandler _ssdp;
- private Timer _timer;
+ private PeriodicTimer _timer;
private bool _isStarted;
public ExternalPortForwarding(ILogManager logmanager, IServerApplicationHost appHost, IServerConfigurationManager config, ISsdpHandler ssdp)
@@ -95,7 +96,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
NatUtility.UnhandledException += NatUtility_UnhandledException;
NatUtility.StartDiscovery();
- _timer = new Timer(s => _createdRules = new List<string>(), null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5));
+ _timer = new PeriodicTimer(s => _createdRules = new List<string>(), null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5));
_ssdp.MessageReceived += _ssdp_MessageReceived;