diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-07-12 17:41:20 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2025-07-12 17:41:20 -0500 |
| commit | 97a5431783e5f78be812baabadaaa65a4f15cd7d (patch) | |
| tree | 7af1b15289e61eeeb2f5dfe9bf23b6f69f7d119b /src/slskd/Search | |
| parent | aedb3da5b707f0c611120918e01e017523aaa018 (diff) | |
| download | slskd-97a5431783e5f78be812baabadaaa65a4f15cd7d.tar.gz | |
update db before broadcast
Diffstat (limited to 'src/slskd/Search')
| -rw-r--r-- | src/slskd/Search/SearchService.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/slskd/Search/SearchService.cs b/src/slskd/Search/SearchService.cs index 9181dfb3..53dec091 100644 --- a/src/slskd/Search/SearchService.cs +++ b/src/slskd/Search/SearchService.cs @@ -267,9 +267,10 @@ namespace slskd.Search // transition, we should instead see the task below throw, in which case it will become // faulted and we'll set the Completed flag manually in the ContinueWith() block search = search.WithSoulseekSearch(args.Search); - SearchHub.BroadcastUpdateAsync(search); Update(search); + SearchHub.BroadcastUpdateAsync(search); + Log.Debug("Search for '{Query}' state changed: {State} (id: {Id})", query, search.State, id); }, responseReceived: (args) => rateLimiter.Invoke(() => @@ -281,6 +282,8 @@ namespace slskd.Search search.FileCount = args.Search.FileCount; search.LockedFileCount = args.Search.LockedFileCount; + Update(search); + // note that we're not actually doing anything with the response here, that's happening in the // response handler. we're only updating counts here. SearchHub.BroadcastUpdateAsync(search); |
