Skip to content

Commit

Permalink
[fix] Avoid swallowing exceptions thrown by user event handlers (#2682)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Atkinson authored and darrachequesne committed Oct 21, 2016
1 parent 21dffa4 commit e60bd5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ Client.prototype.ondecoded = function(packet) {
} else {
var socket = this.nsps[packet.nsp];
if (socket) {
socket.onpacket(packet);
process.nextTick(function() {
socket.onpacket(packet);
});
} else {
debug('no socket for namespace %s', packet.nsp);
}
Expand Down

0 comments on commit e60bd5a

Please sign in to comment.