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

What causes Error: This socket has been ended by the other party? #704

Closed
binarykitchen opened this issue Mar 31, 2016 · 6 comments
Closed

Comments

@binarykitchen
Copy link

I'd like to know what can trigger the error below? It rarely happens for my app and is very difficult to debug/fix. Thanks!

Error
Error: This socket has been ended by the other party

Error properties (debug)
code: EPIPE

Stack
Error: This socket has been ended by the other party
at TLSSocket.writeAfterFIN [as write] (net.js:274:12)
at Sender.frameAndSend (/var/www/videomail/production/source/node_modules/ws/lib/Sender.js:232:22)
at /var/www/videomail/production/source/node_modules/ws/lib/Sender.js:126:12
at /var/www/videomail/production/source/node_modules/ws/lib/PerMessageDeflate.js:301:5
at afterWrite (_stream_writable.js:355:3)
at onwrite (_stream_writable.js:346:7)
at WritableState.onwrite (_stream_writable.js:89:5)
at afterTransform (_stream_transform.js:79:3)
at TransformState.afterTransform (_stream_transform.js:54:12)
at Zlib.callback (zlib.js:613:5)
@ckross01
Copy link

Typically this is sent when another application (client, browser, etc.) closes the socket when you are still sending data to it from the server.

I've had it happen when my browser drops the connection to the server on the socket while I am writing data to it.

@binarykitchen
Copy link
Author

got it, thanks

@njam
Copy link

njam commented Apr 27, 2016

What is the recommended way to handle/catch such an error?
cc @vogdb

@ckross01
Copy link

The readme section on handling errors is pretty solid for when sends throw exceptions.

https://github.com/websockets/ws#error-handling-best-practices

@njam
Copy link

njam commented Apr 27, 2016

Sorry, my bad, thanks for the link!

@palashjain
Copy link

@binarykitchen can you please help me for the same? I am getting same error when executing scripts on multiple physical devices connected to one USB hub.

Full details here.

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

No branches or pull requests

4 participants