mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 12:33:07 +00:00
Merge pull request #3250 from thelounge/xpaw/identd-error
Add extra socket/server error event handlers
This commit is contained in:
commit
001b643d88
2 changed files with 6 additions and 0 deletions
|
@ -24,6 +24,9 @@ class Identification {
|
||||||
}
|
}
|
||||||
|
|
||||||
const server = net.createServer(this.serverConnection.bind(this));
|
const server = net.createServer(this.serverConnection.bind(this));
|
||||||
|
|
||||||
|
server.on("error", (err) => log.error(`Identd server error: ${err}`));
|
||||||
|
|
||||||
server.listen({
|
server.listen({
|
||||||
port: Helper.config.identd.port || 113,
|
port: Helper.config.identd.port || 113,
|
||||||
host: Helper.config.bind,
|
host: Helper.config.bind,
|
||||||
|
@ -39,6 +42,7 @@ class Identification {
|
||||||
}
|
}
|
||||||
|
|
||||||
serverConnection(socket) {
|
serverConnection(socket) {
|
||||||
|
socket.on("error", (err) => log.error(`Identd socket error: ${err}`));
|
||||||
socket.on("data", (data) => {
|
socket.on("data", (data) => {
|
||||||
this.respondToIdent(socket, data);
|
this.respondToIdent(socket, data);
|
||||||
socket.end();
|
socket.end();
|
||||||
|
|
|
@ -159,6 +159,8 @@ module.exports = function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
sockets.on("connect", (socket) => {
|
sockets.on("connect", (socket) => {
|
||||||
|
socket.on("error", (err) => log.error(`io socket error: ${err}`));
|
||||||
|
|
||||||
if (Helper.config.public) {
|
if (Helper.config.public) {
|
||||||
performAuthentication.call(socket, {});
|
performAuthentication.call(socket, {});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue