From d59eee14433a851607281b847de11cc6c2233cff Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Tue, 20 Dec 2022 15:51:45 +0000 Subject: Ignore messages rather than exiting if the client that sent a message no longer exists. --- message.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'message.c') diff --git a/message.c b/message.c index c205709..ac30b11 100644 --- a/message.c +++ b/message.c @@ -835,8 +835,9 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int // Index of client fd in clients array for use later int clientindex = arrindex(clients, sourcefd); if (clientindex < 0) { - debugprint(DEBUG_CRIT, "processclientmessage(): error: arrindex() returned '%d', exiting!\n", clientindex); - exit(1); + // Client not found (perhaps disconnected after failing to authenticate following a previous ircmessage in the same rawstring) + debugprint(DEBUG_CRIT, "processclientmessage(): error: arrindex() returned '%d', returning 1!\n", clientindex); + return 1; } // PASS received? User is trying to log in, check their password. -- cgit v1.2.3