Skip to content
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

fix: send OPEN message when client reconnects #462

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

hissinger
Copy link

@hissinger hissinger commented Oct 13, 2024

There are cases where the open event does not fire when calling peer.reconnect() on the client.

If the socket with the client is connected after the client information has been removed from the server, there is no issue.

However, if a new socket is connected due to a reconnect before the client information is removed from the server, the MessageType.OPEN is not sent, causing the client to fail in receiving the open event.

Therefore, I modified it so that MessageType.OPEN is sent even when the client exists, when the _onSocketConnection() of the new socket is called.

For reference, there is an issue posted in the PeerJS repo by someone who experienced the same problem as I did. peers/peerjs#1289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant