Skip to content

Use new socket instead of reusing socket#11

Merged
nbolton merged 4 commits intomasterfrom
improve-asserts
Jun 14, 2025
Merged

Use new socket instead of reusing socket#11
nbolton merged 4 commits intomasterfrom
improve-asserts

Conversation

@nbolton
Copy link
Member

@nbolton nbolton commented May 16, 2025

Fixes: #12

When handling a message, we should not expect the socket to be open and set as a reconnect may have happened at the same time a message is received. Also, the global socket may have changed due to reconnect, so we shouldn't use that (always use the new socket for the handlers).

This PR also:

  • Improves error message UX (to be less noisy).
  • Logs an error when message received on socket that is closed instead of assert.

@nbolton nbolton changed the title Replace assert with error log on socket message and improve error message UX (to be less noisy) Replace assert with error log on socket message May 16, 2025
@nbolton nbolton changed the title Replace assert with error log on socket message Use new socket instead of reusing socket Jun 14, 2025
@nbolton nbolton marked this pull request as ready for review June 14, 2025 08:59
@nbolton nbolton merged commit c44e28a into master Jun 14, 2025
@nbolton nbolton deleted the improve-asserts branch June 14, 2025 08:59
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.

Assertation error on message received (roomSocket not falsy)

1 participant