aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-04-22 18:48:42 -0500
committerJP Dillingham <jp@dillingham.me>2026-04-22 18:48:42 -0500
commitc6f3bcb5da8d9a075789b1136cf46bb1ad86835d (patch)
tree95589ace6c97ec379ebbf06cf7969d5621a1c981 /src
parent0e79985655abcbf10380f60fd50da46c47d8af88 (diff)
downloadslskd-c6f3bcb5da8d9a075789b1136cf46bb1ad86835d.tar.gz
use only cached blacklist status pre-search
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index a8a7883a..b25713ef 100644
--- a/src/slskd/Application.cs
+++ b/src/slskd/Application.cs
@@ -1651,7 +1651,9 @@ namespace slskd
var sw = new Stopwatch();
sw.Start();
- if (Users.IsBlacklisted(username))
+ // opportunistically try and avoid performing the search if we have a cached blacklisted value, otherwise
+ // hold off on computing it and filling the cache until we have the user's IP
+ if (Users.IsBlacklisted(username, bypassCache: false))
{
return null;
}