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

Cloudflare requires accept() to be called before sending messages on socket #43

Closed
aboodman opened this issue Sep 12, 2021 · 3 comments
Closed
Labels
behaviour mismatch Different behaviour to Workers runtime fixed-in-next Fixed in next release

Comments

@aboodman
Copy link

... but miniflare doesn't.

@aboodman
Copy link
Author

Sorry I didn't catch the exact error, something like:

You must call accept() on a socket before sending messages on it`

Adding an accept() call on the server side right after constructing WebSocketPair fixed the issue on prod.

@mrbbot
Copy link
Contributor

mrbbot commented Sep 13, 2021

Hey! 👋 Thanks for pointing this out, I'll fix it in the next version.

@mrbbot mrbbot added the behaviour mismatch Different behaviour to Workers runtime label Sep 27, 2021
@mrbbot mrbbot added the fixed-in-next Fixed in next release label Oct 19, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Oct 27, 2021

Hey! 👋 The first pre-release of Miniflare 2 has just been released, including this change. You can find the full changelog here and install it with npm i miniflare@next -D. Please let me know if you have any other issues, and feel free to ask questions in the #miniflare channel of the Cloudflare Workers Discord server.

@mrbbot mrbbot closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behaviour mismatch Different behaviour to Workers runtime fixed-in-next Fixed in next release
Projects
None yet
Development

No branches or pull requests

2 participants