Skip to content

write EPIPE #13204

Closed
Closed
@ghost

Description

  • 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions