-
-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
peer_connection: Implement state changes after spec and fix race (#598)
* peer_connection: Implement state changes after spec https://www.w3.org/TR/webrtc/#rtcpeerconnectionstate-enum Ported from PION pion/webrtc#2435 * peer_connection: Fix state transition race DTLS transport state was previously acquired and sent over to the async context returned. This would in some rare cases obviously lead to updating peer connection state with an old DTLS transport state. This would in turn lead to PeerConnection not updating it's state correctly. Sometimes we would see PeerConnection never reaching Connected. * peer_connection: Initialize PeerConnectionInternal correctly PeerConnectionInternal was initialized with default transports and then mutated right after. This resulted in create_ice_transport() using the default DTLS transport instance which again led to state transition reading DTLS transport state from the wrong instance.
- Loading branch information
Showing
3 changed files
with
197 additions
and
87 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