better limit adjustment for relay discovery
This commit is contained in:
parent
8faf5403c5
commit
b62c83bd5c
|
@ -116,7 +116,8 @@ func (h *AutoRelayHost) findRelays(ctx context.Context) {
|
|||
h.mx.Unlock()
|
||||
|
||||
limit := 20
|
||||
for ; need > limit; limit *= 2 {
|
||||
if need > limit/2 {
|
||||
limit = 2 * need
|
||||
}
|
||||
|
||||
dctx, cancel := context.WithTimeout(ctx, 60*time.Second)
|
||||
|
|
Loading…
Reference in New Issue