diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-08-04 18:25:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-04 18:25:35 -0500 |
| commit | d9c5aa6df4a140c7b6e2a1dcd6499bcd3091d99e (patch) | |
| tree | 3a68418b876a4f1dbed9c5aabedbd2644ce32277 /src/slskd/Application.cs | |
| parent | bdd085700fa57cf8db0230139c8c639bf70d5ab9 (diff) | |
| parent | 219aa156446e2465783cc018510cd9a18e643bb7 (diff) | |
| download | slskd-d9c5aa6df4a140c7b6e2a1dcd6499bcd3091d99e.tar.gz | |
Merge pull request #1411 from slskd/debug-config
Fix bug preventing proper change detection when updating options with an enum type
Diffstat (limited to 'src/slskd/Application.cs')
| -rw-r--r-- | src/slskd/Application.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index a28d2a2f..e1f8d762 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1270,6 +1270,8 @@ namespace slskd // shenanigans here could lead to missed updates. await OptionsSyncRoot.WaitAsync(); + Log.Debug("OptionsMonitor OnChange Invoked"); + try { var pendingRestart = false; @@ -1281,9 +1283,12 @@ namespace slskd // don't react to duplicate/no-change events https://github.com/slskd/slskd/issues/126 if (!diff.Any()) { + Log.Debug("Diff of previous and new options is the same; nothing to do"); return; } + Log.Debug("Diff of previous and new options contains {Count} changed properties: {Properties}", diff.Count(), diff.Select(p => p.FQN)); + foreach (var (property, fqn, left, right) in diff) { static bool HasAttribute<T>(PropertyInfo property) => property.CustomAttributes.Any(a => a.AttributeType == typeof(T)); |
