aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-12 09:07:29 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-12 09:07:29 -0500
commit9b3a2db7ac917913a0baa54432b6f844437800e8 (patch)
tree10ecce407b0b60fd06b00c09f4e9c012feb8ac76 /src
parentaaf470a1cde07b20f2a30c3063a8c01105bf8fc8 (diff)
downloadslskd-9b3a2db7ac917913a0baa54432b6f844437800e8.tar.gz
broadcast options on change
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index 1027d7f3..681384b3 100644
--- a/src/slskd/Application.cs
+++ b/src/slskd/Application.cs
@@ -638,6 +638,9 @@ namespace slskd
Logger.Information("One or more updated options requires an application restart to take effect.");
}
+ PreviousOptions = newOptions;
+ _ = ApplicationHub.BroadcastOptionsAsync(newOptions);
+
Logger.Information("Options updated successfully.");
}
catch (Exception ex)
@@ -646,7 +649,6 @@ namespace slskd
}
finally
{
- PreviousOptions = OptionsMonitor.CurrentValue;
OptionsSyncRoot.ExitWriteLock();
}
}
@@ -740,7 +742,7 @@ namespace slskd
private void State_OnChange((State Previous, State Current) state)
{
Logger.Debug("State changed from {Previous} to {Current}", state.Previous.ToJson(), state.Current.ToJson());
- ApplicationHub.BroadcastStateAsync(state.Current);
+ _ = ApplicationHub.BroadcastStateAsync(state.Current);
}
/// <summary>