From dd097470d22021da02d9538faa930d2fec01130c Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 22 Oct 2025 07:52:08 -0300 Subject: [PATCH] try to reconnect even if the first connection failed. --- pool.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pool.go b/pool.go index 15e6366..17cdb64 100644 --- a/pool.go +++ b/pool.go @@ -422,7 +422,6 @@ func (pool *Pool) subMany( } eosed := atomic.Bool{} - firstConnection := true go func(nm string) { defer func() { @@ -459,17 +458,10 @@ func (pool *Pool) subMany( relay, err := pool.EnsureRelay(nm) if err != nil { - // if we never connected to this just fail - if firstConnection { - debugLogf("[pool] connection to %s failed, won't retry as it was the first attempt\n", nm) - return - } - // otherwise (if we were connected and got disconnected) keep trying to reconnect debugLogf("[pool] connection to %s failed, will retry\n", nm) goto reconnect } - firstConnection = false hasAuthed = false subscribe: