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

Processing socket error on upgrade #598

Closed

Conversation

crumbjp
Copy link

@crumbjp crumbjp commented Mar 1, 2020

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

nodejs 12.16.1
socket.io 2.3.0
engine.io 3.4.0

events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:154:25)
    at writeGeneric (internal/stream_base_commons.js:145:3)
    at Socket._writeGeneric (net.js:780:11)
    at Socket._write (net.js:792:8)
    at doWrite (_stream_writable.js:441:12)
    at writeOrBuffer (_stream_writable.js:425:5)
    at Socket.Writable.write (_stream_writable.js:316:11)
    at abortConnection (/PATHTO/node_modules/engine.io/lib/server.js:506:12)
    at /PATHTO/node_modules/engine.io/lib/server.js:353:7
    at Server.verify (/PATHTO/node_modules/engine.io/lib/server.js:158:14)
    at Server.handleUpgrade (/PATHTO/node_modules/engine.io/lib/server.js:351:8)
    at Server.<anonymous> (/PATHTO/node_modules/engine.io/lib/server.js:478:14)
    at Server.emit (events.js:311:20)
    at Server.EventEmitter.emit (domain.js:482:12)
    at onParserExecuteCommon (_http_server.js:642:14)
    at onParserExecute (_http_server.js:583:3)
Emitted 'error' event on Socket instance at:
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:456:5)
    at onwrite (_stream_writable.js:483:5)
    at internal/streams/destroy.js:50:7
    at Socket._destroy (net.js:673:5)
    at Socket.destroy (internal/streams/destroy.js:38:8)
    at afterWriteDispatched (internal/stream_base_commons.js:154:17)
    at writeGeneric (internal/stream_base_commons.js:145:3)
    [... lines matching original stack trace ...]
    at Server.verify (/PATHTO/node_modules/engine.io/lib/server.js:158:14) {
  errno: 'EPIPE',
  code: 'EPIPE',
  syscall: 'write'

New behaviour

Other information (e.g. related issues)

darrachequesne added a commit that referenced this pull request Apr 15, 2020
In order to catch the following errors:

```
events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:154:25)
    at writeGeneric (internal/stream_base_commons.js:145:3)
    at Socket._writeGeneric (net.js:780:11)
    at Socket._write (net.js:792:8)
    at doWrite (_stream_writable.js:441:12)
    at writeOrBuffer (_stream_writable.js:425:5)
    at Socket.Writable.write (_stream_writable.js:316:11)
    at abortConnection (<myproject>/node_modules/engine.io/lib/server.js:506:12)
    at <myproject>/node_modules/engine.io/lib/server.js:353:7
    at Server.verify (<myproject>/node_modules/engine.io/lib/server.js:158:14)
    at Server.handleUpgrade (<myproject>/node_modules/engine.io/lib/server.js:351:8)
```

Closes #596, #598
@darrachequesne
Copy link
Member

Thanks for the pull request! Closed by #601

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

Successfully merging this pull request may close these issues.

2 participants