From 493d69bb5e695ccfd2bdee51eaf51e4260c5012f Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 22 Oct 2025 07:50:58 -0300 Subject: [PATCH] try to reconnect even if the first connection failed. fixes https://github.com/nbd-wtf/go-nostr/issues/193 --- pool.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pool.go b/pool.go index 63c86cc..a5b5a53 100644 --- a/pool.go +++ b/pool.go @@ -445,7 +445,6 @@ func (pool *SimplePool) subMany( } eosed := atomic.Bool{} - firstConnection := true go func(nm string) { defer func() { @@ -484,16 +483,10 @@ func (pool *SimplePool) subMany( relay, err := pool.EnsureRelay(nm) if err != nil { - // if we never connected to this just fail - if firstConnection { - return - } - // otherwise (if we were connected and got disconnected) keep trying to reconnect debugLogf("%s reconnecting because connection failed\n", nm) goto reconnect } - firstConnection = false hasAuthed = false subscribe: