limit reconnect interval to 10min.

see https://github.com/nbd-wtf/go-nostr/issues/198
This commit is contained in:
fiatjaf
2025-11-12 10:15:49 -03:00
parent c2ab9d082c
commit 00c153cf92

View File

@@ -537,7 +537,7 @@ func (pool *Pool) subMany(
// until the context is canceled // until the context is canceled
debugLogf("[pool] retrying %s in %s\n", nm, interval) debugLogf("[pool] retrying %s in %s\n", nm, interval)
time.Sleep(interval) time.Sleep(interval)
interval = interval * 17 / 10 // the next time we try we will wait longer interval = min(10*time.Minute, interval*17/10) // the next time we try we will wait longer
} }
}(url) }(url)
} }