-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quic: avoid deadlock on listener close
Avoid holding Listener.connsMu while blocking on a Conn's loop, since the Conn can acquire the mutex while shutting down. Fix Conn.waitReady to check conn readiness before checking the Context doneness. This doesn't make a difference in the current exported API, but this simplifies some tests and will be useful once 0-RTT is implemented. Refactor a bit of the testConn datagram handling to use a testListener type, which helped expose the above deadlock and will be useful for writing tests which don't involve a Conn. Change-Id: I064fca99ae9a165631fc0ff46eb334d25d7dd957 Reviewed-on: https://go-review.googlesource.com/c/net/+/529935 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
- Loading branch information
Showing
4 changed files
with
100 additions
and
38 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
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