summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2022-12-20 15:51:45 +0000
committerLuke Bratch <luke@bratch.co.uk>2022-12-20 15:51:45 +0000
commitd59eee14433a851607281b847de11cc6c2233cff (patch)
tree36c48298daf0c6be58fd249a58cf2500c6f9c4c8 /message.c
parent2639271eaab1990e0fb5832cb8bfbcdaf0e33022 (diff)
Ignore messages rather than exiting if the client that sent a message no longer exists.
Diffstat (limited to 'message.c')
-rw-r--r--message.c5
1 files changed, 3 insertions, 2 deletions
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.