mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 03:53:08 +00:00
ident: close connections if they don't send data
This commit is contained in:
parent
12679081c8
commit
29fcc2da05
1 changed files with 8 additions and 0 deletions
|
@ -66,6 +66,14 @@ class Identification {
|
|||
|
||||
serverConnection(socket: Socket) {
|
||||
socket.on("error", (err: string) => log.error(`Identd socket error: ${err}`));
|
||||
socket.setTimeout(5000, () => {
|
||||
log.warn(
|
||||
`identd: no data received, closing connection to ${
|
||||
socket.remoteAddress || "undefined"
|
||||
}`
|
||||
);
|
||||
socket.destroy();
|
||||
});
|
||||
socket.once("data", (data) => {
|
||||
this.respondToIdent(socket, data);
|
||||
socket.end();
|
||||
|
|
Loading…
Reference in a new issue