damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 8a15265f842a0a5fce721285edf5c04bfa6cf1f8
parent 9f7711fdfe54dddcebfd4cfde509968c50aa1e2c
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 30 Oct 2022 23:13:48 -0700

even more aggressive reconnect on stale connections

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Nostr/RelayPool.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Nostr/RelayPool.swift b/damus/Nostr/RelayPool.swift @@ -84,7 +84,7 @@ class RelayPool { let is_connecting = c.isReconnecting || c.isConnecting - if is_connecting && (Date.now.timeIntervalSince1970 - c.last_connection_attempt) > 10 { + if is_connecting && (Date.now.timeIntervalSince1970 - c.last_connection_attempt) > 5 { print("stale connection detected (\(relay.descriptor.url.absoluteString)). retrying...") relay.connection.connect(force: true) } else if relay.is_broken || is_connecting || c.isConnected {