diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-07-13 17:21:46 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2025-07-13 17:21:46 -0500 |
| commit | 2596869a91f6c9348f87bfbc6dce13eb73521a93 (patch) | |
| tree | bdb6f283512562ed60b455f20082a9d5d74cc1a2 /src | |
| parent | ffb43e18f389a85a7dd4d4c3dee5faca40b90977 (diff) | |
| download | slskd-2596869a91f6c9348f87bfbc6dce13eb73521a93.tar.gz | |
docs
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Search/SearchService.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/slskd/Search/SearchService.cs b/src/slskd/Search/SearchService.cs index d542b65a..186267d0 100644 --- a/src/slskd/Search/SearchService.cs +++ b/src/slskd/Search/SearchService.cs @@ -334,10 +334,12 @@ namespace slskd.Search } } - // todo: remove this once we're sure the problem is fixed + // it shouldn't be possible for this to happen, as the StateChanged callback is called before the + // SearchAsync() method returns, and we will have already updated the record at that time. if for + // some extremely odd reason that doesn't happen, make sure the record is persisted the final time + // with the Completed flag set to avoid it getting "stuck" if (!search.State.HasFlag(SearchStates.Completed)) { - Log.Warning("Gotcha! Search for '{Search}' concluded without the Completed flag. Time is now {Timestamp}. States: {States}", query.SearchText, DateTime.UtcNow, stateTransitions); search.State |= SearchStates.Completed; } |
