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

Best way to graciously close a 'muxed socket' with spdy-transport #26

Closed
daviddias opened this issue May 6, 2016 · 3 comments
Closed

Comments

@daviddias
Copy link
Member

@indutny what would the best practice you recommend graciously close a muxed socket, without having it blow up in the other side because of the socket hanging up? As in:

Uncaught Error: socket hang up
  at Socket.onclose (node_modules/spdy-transport/lib/spdy-transport/connection.js:186:15)
  at TCP._onclose (net.js:477:12)

Is listening on the spdy dialer/listener object for 'error' the best option?

Thank you :)

@daviddias
Copy link
Member Author

daviddias commented May 30, 2016

@indutny I'm back in this issue, spdy-transport crashes if there are still streams on the wire that haven't been closed. Where can I catch this error?

I'm catching it on this event - https://github.com/indutny/spdy-transport/blob/master/lib/spdy-transport/connection.js#L189, but still goes uncaught.

@daviddias
Copy link
Member Author

go it. I was not properly listening for 'error' on the dialing side and that was always escaping me:)

@nharlow89
Copy link

@diasdavid I came across this same issue, would you mind sharing how you properly listen for the 'error' event on dialing side?

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

No branches or pull requests

2 participants