From fe491bf69467350498cd5dc1e58507ed21dcf43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Wed, 24 Sep 2025 17:52:38 -0700 Subject: [PATCH] Increase MAX_CONCURRENT_SUBSCRIPTION_LIMIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Through some local experimentation, it seems that network relays can support higher subscription limits. Increase internal limits to avoid hitting issues with subscriptions waiting on subscription pool to clear and appearing stale. Signed-off-by: Daniel D’Aquino --- damus/Core/Nostr/RelayPool.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/damus/Core/Nostr/RelayPool.swift b/damus/Core/Nostr/RelayPool.swift index ffa38c0b..0d5f0b7d 100644 --- a/damus/Core/Nostr/RelayPool.swift +++ b/damus/Core/Nostr/RelayPool.swift @@ -45,8 +45,8 @@ class RelayPool { private var last_network_status: NWPath.Status = .unsatisfied /// The limit of maximum concurrent subscriptions. Any subscriptions beyond this limit will be paused until subscriptions clear - /// This is to avoid error states and undefined behaviour related to hitting subscription limits on the relays, by letting those wait instead — with the principle that slower is better than broken. - static let MAX_CONCURRENT_SUBSCRIPTION_LIMIT = 10 // This number is only an educated guess at this point. + /// This is to avoid error states and undefined behaviour related to hitting subscription limits on the relays, by letting those wait instead — with the principle that although slower is not ideal, it is better than completely broken. + static let MAX_CONCURRENT_SUBSCRIPTION_LIMIT = 14 // This number is only an educated guess based on some local experiments. func close() { disconnect()