mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 06:34:21 +00:00
ident: fix write after connection end
We only respond once to data, then half-close the connection. Hence, we should only listen to a single data event as well, else if the remote doesn't stop sending data we keep trying to write to the closed write end of the pipe.
This commit is contained in:
parent
0e48014d5a
commit
12679081c8
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ class Identification {
|
|||
|
||||
serverConnection(socket: Socket) {
|
||||
socket.on("error", (err: string) => log.error(`Identd socket error: ${err}`));
|
||||
socket.on("data", (data) => {
|
||||
socket.once("data", (data) => {
|
||||
this.respondToIdent(socket, data);
|
||||
socket.end();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue