Browse Source

better limit adjustment for relay discovery

pull/454/head
vyzo 6 years ago
parent
commit
b62c83bd5c
  1. 3
      p2p/host/relay/autorelay.go

3
p2p/host/relay/autorelay.go

@ -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…
Cancel
Save