Skip to content

fix: prevent One-Way WebSocket error messages for closed connections in React Dev Mode #17204

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

Parkreiner
Copy link
Member

@Parkreiner Parkreiner commented Apr 1, 2025

No issue to link – this was raised by @BrunoQuaresma when he was using a dev version of the frontend with a production version of the backend.

Changes made

  • Updated OneWayWebSocket class to prevent errors from being dispatched after a connection has been manually closed.
  • Renamed one of the class properties for less ambiguity
  • Made error messages for the class constructor more specific

@Parkreiner Parkreiner added the hotfix PRs only. Harmless small change. Only humans may set this. label Apr 1, 2025
@Parkreiner Parkreiner self-assigned this Apr 1, 2025
Copy link

@cdr-bot cdr-bot bot left a comment

Choose a reason for hiding this comment

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

This PR is a hotfix and has been automatically approved.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ✅ Less than 100 lines

@Parkreiner Parkreiner merged commit ac0cf35 into main Apr 2, 2025
38 checks passed
@Parkreiner Parkreiner deleted the mes/owws-strict-mode branch April 2, 2025 14:24
@Parkreiner Parkreiner changed the title fix: silence One-Way WebSocket error messages in React Strict Mode fix: silence One-Way WebSocket error messages in React Dev Mode Apr 2, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2025
@Parkreiner Parkreiner changed the title fix: silence One-Way WebSocket error messages in React Dev Mode fix: prevent One-Way WebSocket error messages for closed connections in React Dev Mode Apr 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix PRs only. Harmless small change. Only humans may set this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants