Skip to content

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Nov 15, 2016

Right now the close callback is invoked immediately but it should be called when the HTTP server emits the 'close' event.

error = e;
}
}
for (const client of this.clients) client.terminate();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the try...catch statement because WebSocket.prototype.terminate() does not throw errors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But doesn't the underlaying node code could be throwing errors.

@lpinca lpinca force-pushed the fix/close-callback branch from e033f24 to 084369d Compare November 15, 2016 14:48
@3rd-Eden
Copy link
Member

nvm, all those other functions are already wrapping all socket calls in try { } catch () {}

@3rd-Eden 3rd-Eden merged commit 490d921 into master Nov 15, 2016
@3rd-Eden 3rd-Eden deleted the fix/close-callback branch November 15, 2016 17:00
@lpinca lpinca mentioned this pull request Dec 12, 2016
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