From 9f8ecca96bccc096fdf503823f7cda5c5eb8e6fc Mon Sep 17 00:00:00 2001 From: emerson Date: Mon, 3 Jul 2023 13:12:53 +0000 Subject: [PATCH] mark client as unregistered when the connection is closed --- src/IRCClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IRCClient.ts b/src/IRCClient.ts index 9d81cfd..df1f90f 100644 --- a/src/IRCClient.ts +++ b/src/IRCClient.ts @@ -6,7 +6,7 @@ export class IRCClient extends Client { constructor(private socket: Socket , public server: IRCServer) { super(server); this.socket.on('data', (data) => this.receiveData(data)); - this.socket.on('close', (e) => {this.closeConnection()}); + this.socket.on('close', (e) => {this.isRegistered = false; this.closeConnection()}); this.server.doLog("New IRCClient connected"); }