-
Couldn't load subscription status.
- Fork 1.8k
Fix deadlock in DTLS shutdown #488
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
Conversation
|
I should have a fix soon, but wanted to make sure I had reproduce first |
| time.Sleep(3 * time.Second) // TODO PeerConnection.Close() doesn't block for all subsystems | ||
| close(iceComplete) | ||
| }() | ||
| time.Sleep(3 * time.Second) // TODO PeerConnection.Close() doesn't block for all subsystems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fired in a goroutine already, I don't want users to see this and assume they need the same.
|
|
||
| if endpoint == nil { | ||
| fmt.Printf("Warning: mux: no endpoint for packet starting with %d\n", buf[0]) | ||
| muxLog.Warnf("Warning: mux: no endpoint for packet starting with %d\n", buf[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moving everything off of fmt.
Pull Request Test Coverage Report for Build 2377
💛 - Coveralls |
DTLS shutdown deadlocks if Close is called before startup completes, because the DTLS connection hasn't finished yet we don't have handles to close anything. This updates DTLS to follow how SCTP is shutdown, by shutting down the nextConn (ICE in this case) we can shutdown the subsystem. By closing ICE first, DTLS (and then SCTP) close properly no matter what state they are in. Resolves #487
DTLS shutdown deadlocks if Close is called before startup completes,
because the DTLS connection hasn't finished yet we don't have handles
to close anything.
This updates DTLS to follow how SCTP is shutdown, by shutting down the
nextConn (ICE in this case) we can shutdown the subsystem. By closing
ICE first, DTLS (and then SCTP) close properly no matter what state
they are in.