Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
b62c83bd
Commit
b62c83bd
authored
Oct 19, 2018
by
vyzo
Browse files
better limit adjustment for relay discovery
parent
8faf5403
Changes
1
Show whitespace changes
Inline
Side-by-side
p2p/host/relay/autorelay.go
View file @
b62c83bd
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment