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 duplicate chat connection id crash #154

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

MarcusLongmuir
Copy link
Contributor

Fixes an issue where old/flaky connections that a client has abandoned are still tracked by the server and retry attempts from the client would result in a collision and an error was thrown.

The change in behaviour is to explicitly reject these new incoming attempts in favour of maintaining the old connection until that old connection fails a heartbeat.

What kind of change does your PR introduce? (check at least one)

  • Bugfix

@@ -360,7 +360,7 @@ export class Networked3dWebExperienceClient {
this.networkChat = new ChatNetworkingClient({
url: this.config.chatNetworkAddress,
sessionToken: this.config.sessionToken,
websocketFactory: (url: string) => new WebSocket(`${url}?id=${this.clientId}`),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by cleanup

@TheCodeTherapy TheCodeTherapy merged commit 2e06fe9 into main Jul 2, 2024
5 checks passed
@TheCodeTherapy TheCodeTherapy deleted the bugfix/chat-duplicate-crash branch July 2, 2024 13:24
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.

2 participants