aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Search
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-07-12 17:41:20 -0500
committerJP Dillingham <jp@dillingham.me>2025-07-12 17:41:20 -0500
commit97a5431783e5f78be812baabadaaa65a4f15cd7d (patch)
tree7af1b15289e61eeeb2f5dfe9bf23b6f69f7d119b /src/slskd/Search
parentaedb3da5b707f0c611120918e01e017523aaa018 (diff)
downloadslskd-97a5431783e5f78be812baabadaaa65a4f15cd7d.tar.gz
update db before broadcast
Diffstat (limited to 'src/slskd/Search')
-rw-r--r--src/slskd/Search/SearchService.cs5
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);