Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: libp2p#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 only connection to the peer is webRTC at this point.
- Loading branch information