Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

browser-to-browser example only works in one direction #173

Closed
Marcel-G opened this issue Jun 1, 2023 · 0 comments · Fixed by #172
Closed

browser-to-browser example only works in one direction #173

Marcel-G opened this issue Jun 1, 2023 · 0 comments · Fixed by #172
Assignees

Comments

@Marcel-G
Copy link
Contributor

Marcel-G commented Jun 1, 2023

After closing the the connection to the relay, the example only works in a single direction.
I have created a draft PR to illustrate the problem via the test setup. I don't have any more information on why this is the case or how to fix it.

See: #172

@maschad maschad added this to js-libp2p Jun 1, 2023
@maschad maschad moved this to 🤨Needs Investigation in js-libp2p Jun 1, 2023
@maschad maschad self-assigned this Jun 1, 2023
Marcel-G added a commit to Marcel-G/js-libp2p-webrtc that referenced this issue Jun 10, 2023
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.
Marcel-G added a commit to Marcel-G/js-libp2p-webrtc that referenced this issue Jun 10, 2023
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.
Marcel-G added a commit to Marcel-G/js-libp2p-webrtc that referenced this issue Jun 10, 2023
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.
Marcel-G added a commit to Marcel-G/js-libp2p-webrtc that referenced this issue Jun 10, 2023
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.
@github-project-automation github-project-automation bot moved this from 🤨Needs Investigation to 🎉Done in js-libp2p Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants