diff options
author | Luke Bratch <luke@bratch.co.uk> | 2022-12-20 15:51:45 +0000 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2022-12-20 15:51:45 +0000 |
commit | d59eee14433a851607281b847de11cc6c2233cff (patch) | |
tree | 36c48298daf0c6be58fd249a58cf2500c6f9c4c8 | |
parent | 2639271eaab1990e0fb5832cb8bfbcdaf0e33022 (diff) |
Ignore messages rather than exiting if the client that sent a message no longer exists.
-rw-r--r-- | message.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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. |