Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move go-libp2p-transport-upgrader here #1463

Merged
merged 85 commits into from
Apr 27, 2022
Merged

move go-libp2p-transport-upgrader here #1463

merged 85 commits into from
Apr 27, 2022

Conversation

marten-seemann
Copy link
Contributor

@marten-seemann marten-seemann commented Apr 26, 2022

Part of #1187.

Stebalien and others added 30 commits January 19, 2018 14:56
… queued up

Otherwise, we'll have an annoying saw-tooth pattern where we'll accept a bunch
of connections, set them up in parallel, and then wait until we pass them all
back up to the swarm before accepting any more.

This commit allows us to queue up 16 ready connections before ceasing to accept
any new connections. We'll still probably have a saw-tooth pattern under heavy
load but it should be less pronounced (and we can improve the situation by
upping the queue size.
Also, add a context canceled check to the loop just in case (accept could, if
buggy, return temporary errors after it's closed).
keep accepting and negotiating connections until we have 16 ready and queued up
wait after accepting a new connection if the queue is full
It could have been sitting around for a while.
Otherwise, setting global variables races with running goroutines.
improve correctness of closing connections on failure
dep: import go-libp2p-mplex into the libp2p org
marten-seemann and others added 23 commits September 26, 2021 16:28
use the new network.ConnStats
make the accept timeout configurable, stop using transport.AcceptTimeout
reset the temporary error catcher delay after successful accept
use the new transport.Upgrader interface
rename the package to upgrader
use the Resource Manager
Removes the very ugly contract of "if you know the peer you have set it" and makes the
code robust against upstream bugz.
@marten-seemann marten-seemann merged commit 9f11ccf into master Apr 27, 2022
@marten-seemann marten-seemann mentioned this pull request Apr 27, 2022
65 tasks
@marten-seemann marten-seemann deleted the merge-upgrader branch November 8, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants