You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi and thanks for this library, it really ease things up.
I have detected that when you use WebSocketServer and go and try to establish an HTTP connection to the websocket port the server crashes and closes.
While I obviously don't expect the WS server to work properly when being contacted by the wrong protocol it should fail silently, or at least, allow the programmer to specify an error callback in case things like this occur.
I know that the error is indeed generated by Deno's std library ws. However I think if possible it should be handled here.
Steps to reproduce
deno run --allow-net https://deno.land/x/[email protected]/example/server.ts
error: Uncaught (in promise) Error: request is not acceptable
throw new Error("request is not acceptable");
^
at acceptWebSocket (https://deno.land/[email protected]/ws/mod.ts:453:9)
at WebSocketServer.connect (https://deno.land/x/[email protected]/lib/websocket.ts:35:28)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `sh run.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2021-06-20T16_17_35_643Z-debug.log
Hi and thanks for this library, it really ease things up.
I have detected that when you use WebSocketServer and go and try to establish an HTTP connection to the websocket port the server crashes and closes.
While I obviously don't expect the WS server to work properly when being contacted by the wrong protocol it should fail silently, or at least, allow the programmer to specify an error callback in case things like this occur.
I know that the error is indeed generated by Deno's std library ws. However I think if possible it should be handled here.
Steps to reproduce
deno run --allow-net https://deno.land/x/[email protected]/example/server.ts
Thanks.
The text was updated successfully, but these errors were encountered: