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

write EPIPE #13204

Closed
ghost opened this issue May 24, 2017 · 2 comments
Closed

write EPIPE #13204

ghost opened this issue May 24, 2017 · 2 comments
Labels
invalid Issues and PRs that are invalid.

Comments

@ghost
Copy link

ghost commented May 24, 2017

  • Version: v7.10.0
  • Platform: Linux vultr-1 3.16.0-4-amd64 deps: update openssl to 1.0.1j #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
  • Subsystem: Unsure what this means.

Hi there. I have an application using ws and express. When spam refreshing a page, this error will occur:

Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:814:14)

I have established that the issue is being caused by the library ws, but I have not reported this issue there as there is no evidence in this stack trace to suggest it is being caused by this library. The error seems to be exclusively produced by this snippet:

ws.broadcast = (data) => {
  ws.clients.forEach((client) => {
    if(client && client.readyState === WebSocket.OPEN) 
      client.send(data);
  });
};

Thanks.

@bnoordhuis
Copy link
Member

Can you post support questions to https://github.com/nodejs/help/issues? EPIPE means the other end closed the connection. That's something your application (or ws) needs to handle, node.js core just passes on the event from the operating system.

@bnoordhuis bnoordhuis added the invalid Issues and PRs that are invalid. label May 24, 2017
@timi-liuliang
Copy link

It looks like you are using Jsmpeg library like me. you can add code

   socket.on('error', function(e){	
	console.log(e)
   });

to the WebSocket server.

I have tested it. The server runs ok.

bergie added a commit to c-base/cbeam-telemetry-server that referenced this issue Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid.
Projects
None yet
Development

No branches or pull requests

2 participants