From e5d240a708b1f5db48bf229fe1e83c64ec0200e4 Mon Sep 17 00:00:00 2001 From: Michel de Graaf Date: Mon, 7 Sep 2026 15:27:01 +0200 Subject: [PATCH] fix(lib): raise the search reply cap to 300 files The cap of 150 was attributed to Nicotine+, whose default is in fact 300 (slskd's is 500). A reply now carries up to 300 matches. --- soulseek-rs-lib/src/types.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/soulseek-rs-lib/src/types.rs b/soulseek-rs-lib/src/types.rs index 1c80d1a..3ce829c 100644 --- a/soulseek-rs-lib/src/types.rs +++ b/soulseek-rs-lib/src/types.rs @@ -88,8 +88,9 @@ pub const MAX_SEARCH_FILES: usize = 10_000; /// /// A broad query against a big share would otherwise hand the whole index /// to whoever typed it, on every such search that arrives. Nicotine+ sends -/// 150 by default; a searcher with more sources than that has plenty. -pub const MAX_SEARCH_REPLY_FILES: usize = 150; +/// 300 by default and slskd 500; a searcher with that many sources from one +/// peer has plenty. +pub const MAX_SEARCH_REPLY_FILES: usize = 300; impl Search { /// Store one peer's response, unless this search already holds enough.