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

'error' event is not triggered on the socket on connection error #947

Closed
vicneanschi opened this issue Feb 11, 2016 · 0 comments · Fixed by #1051
Closed

'error' event is not triggered on the socket on connection error #947

vicneanschi opened this issue Feb 11, 2016 · 0 comments · Fixed by #1051

Comments

@vicneanschi
Copy link

I've upgraded from 0.9 and noticed that error event is not triggered on socket when client can't connect to the server.

  socket = io.connect(url, opts);
  socket.on('error', function (error) { 
    // never triggered on connection error
  }).on('connect_error', function(error){
    // this is triggered instead
  });

Documentation says:

Socket::error. Fired upon a connection error

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 a pull request may close this issue.

1 participant