This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
fix: add browser-to-browser test for bi-directional communication #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #173
Before this change, connecting to a webRTC peer over a relay would result in two open connections to the peer. One private-to-private webRTC connection and one relayed connection (used for signalling).
In the browser-to-browser example, dialling B -> A simply returns the first existing connection to A (Added when dialling A -> B). The first connection is not the webRTC connection but rather the relayed connection. This causes the echo to break after the relay is closed or after the reservation expires.
After signalling is complete, the relayed peer connection is no longer needed and can be closed. The connection to the peer is exclusively webRTC at this point.