Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle parallel incoming connection attempts
One major change as of #591 is to do the handshake synchronously instead of using a Connection object and the associated message exchanges. This is fine during the outbound path since the caller is waiting for an active connection. However on the incoming path, we don't want a single slow connection to affect other incoming connection attempts. Instead of performing the incoming connection handshake on the accept goroutine, start a new goroutine to perform the exchange.
- Loading branch information
Showing
2 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters