From d36f60bb4f8c6591c2fa4cfb8e059bf51721c046 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 10 Jun 2019 13:13:27 +0300 Subject: [PATCH] Add extra socket error handlers --- src/identification.js | 1 + src/server.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/identification.js b/src/identification.js index cf412fb4..9ade2f02 100644 --- a/src/identification.js +++ b/src/identification.js @@ -42,6 +42,7 @@ class Identification { } serverConnection(socket) { + socket.on("error", (err) => log.error(`Identd socket error: ${err}`)); socket.on("data", (data) => { this.respondToIdent(socket, data); socket.end(); diff --git a/src/server.js b/src/server.js index 54fa7455..39203041 100644 --- a/src/server.js +++ b/src/server.js @@ -159,6 +159,8 @@ module.exports = function() { }); sockets.on("connect", (socket) => { + socket.on("error", (err) => log.error(`io socket error: ${err}`)); + if (Helper.config.public) { performAuthentication.call(socket, {}); } else {