]> mj.ucw.cz Git - subauth.git/commitdiff
Fix server crash when a connected at a wrong moment
authorMartin Mares <mj@ucw.cz>
Mon, 17 Feb 2025 17:24:13 +0000 (18:24 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 17 Feb 2025 17:24:13 +0000 (18:24 +0100)
server/subauthd.c

index 31753c97a98dafbbfaeaed417c82df01832f9298..211ec0999e60864dc3d2f6f8d0d734cc2e0fd41f 100644 (file)
@@ -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)