Skip to content

Commit

Permalink
On socket end don't emit an additional event
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpenev-s committed Dec 5, 2016
1 parent 5d338d3 commit 96bf401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protocol/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Connection.prototype._addListeners = function _addListeners(socket) {
function onend() {
var err = new Error('Connection closed by server');
err.code = 'EHDBCLOSE';
socket.emit('error', err);
onerror(err);
}
socket.on('end', onend);
};
Expand Down

0 comments on commit 96bf401

Please sign in to comment.