From a64aa90e836bac1ae419afa0ef7df8bcf18da0c1 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Tue, 13 Mar 2018 14:49:20 +0100 Subject: [PATCH] Handle WS client errors, refs nodejs/node#13204 --- server/server.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/server.coffee b/server/server.coffee index c409e60..db2abdc 100644 --- a/server/server.coffee +++ b/server/server.coffee @@ -123,6 +123,9 @@ exports.handleConnection = (server, socket) -> socket.on 'close', -> server.listeners = server.listeners.filter (l) -> l isnt notify + socket.on 'error', -> + server.listeners = server.listeners.filter (l) -> + l isnt notify # Register listener server.listeners.push notify