diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-01-27 15:40:37 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-01-27 15:40:37 +0100 |
| commit | 85a58fd655240fd0ddd10bdaaad4a9bb8cd7051d (patch) | |
| tree | 9cbbefe37ef4a293a42fe9f419809e4b2156f4ea /Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs | |
| parent | ee89236fe8e8fbb94969e228df98b9fc6f3ecd77 (diff) | |
Start startup tasks async
Diffstat (limited to 'Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs')
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index 8755ee3a7..56c730c80 100644 --- a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -61,17 +61,17 @@ namespace Emby.Server.Implementations.EntryPoints return string.Join("|", values.ToArray()); } - void _config_ConfigurationUpdated(object sender, EventArgs e) + private async void _config_ConfigurationUpdated(object sender, EventArgs e) { if (!string.Equals(_lastConfigIdentifier, GetConfigIdentifier(), StringComparison.OrdinalIgnoreCase)) { DisposeNat(); - Run(); + await RunAsync(); } } - public void Run() + public Task RunAsync() { if (_config.Configuration.EnableUPnP && _config.Configuration.EnableRemoteAccess) { @@ -80,6 +80,8 @@ namespace Emby.Server.Implementations.EntryPoints _config.ConfigurationUpdated -= _config_ConfigurationUpdated; _config.ConfigurationUpdated += _config_ConfigurationUpdated; + + return Task.CompletedTask; } private void Start() |
