From: Martin Mares Date: Mon, 17 Feb 2025 17:24:13 +0000 (+0100) Subject: Fix server crash when a connected at a wrong moment X-Git-Tag: v1.1.1~2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=14a52d90ffd06209555c18b684cc3f4621276779;p=subauth.git Fix server crash when a connected at a wrong moment --- diff --git a/server/subauthd.c b/server/subauthd.c index 31753c9..211ec09 100644 --- a/server/subauthd.c +++ b/server/subauthd.c @@ -207,7 +207,9 @@ static int socket_read_handler(struct main_file *fi) file_chg(fi); received_packet(c, packet_buffer, len); - return HOOK_RETRY; + + // This has to be HOOK_IDLE, since the connection may have been already gone. + return HOOK_IDLE; } static int listen_read_handler(struct main_file *fi)