socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Cannot catch websocket error

Open ASBaj opened this issue 6 years ago • 5 comments

You want to:

  • [x] report a bug
  • [ ] request a feature

Current behaviour

What is actually happening? When an unhanded websocket error is thrown (transport.js 64), there does not appear to be a way to prevent the node.js application from crashing.

Steps to reproduce (if the current behaviour is a bug)

  1. Connect your socket.io client to a socket.io server
  2. Connect a device to your network that has the same IP address as your socket.io server
  3. Disconnect your socket.io server from the network
  4. The socket.io client will crash with this error.

Expected behaviour

The socket.io client would disconnect, and then go into a reconnecting state.

Setup

  • OS: Windows Server 2012 R2
  • browser: Node.js
  • socket.io version: 2.1.1

ASBaj avatar Oct 04 '18 20:10 ASBaj