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(WebSocket): add "server.close()" method #528

Merged
merged 9 commits into from
Mar 24, 2024
Merged

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Mar 24, 2024

Allows closing the actual server connection by adding a new server.close() method.

Todo

  • Allow listening to the server.addEventListener('close') to know when the original server closes the connection.
  • Using a special close reason for closures via server.close() isn't that nice. Consider a different logic? For example, properly awaiting the close frame and then doing the server.connect() would solve this.

@kettanaito kettanaito merged commit 4cd11bb into main Mar 24, 2024
1 check passed
@kettanaito kettanaito deleted the fix/ws-server-close branch March 24, 2024 17:34
@kettanaito
Copy link
Member Author

Released: v0.26.11 🎉

This has been released in v0.26.11!

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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