Close active IMAP sessions during shutdown
Debian Trixie package bundle / packages (push) Failing after 12m33s

This commit is contained in:
Mario Fetka
2026-07-30 02:24:12 +02:00
parent 6e17eff2f3
commit fe7c12a45c
+9
View File
@@ -4623,6 +4623,15 @@ IMAPServer(void *unused)
XplConsolePrintf("\rIMAPD: %d server threads outstanding; attempting forceful unload.\r\n", XplSafeRead(Imap.server.active) - 1);
}
/*
* No listener can publish another accepted connection after this point.
* Close the client and Store sockets before waiting for session threads:
* an idle client may otherwise leave its worker blocked in ConnRead()
* until the normal command timeout expires. POP3 uses the same shutdown
* ordering.
*/
ConnCloseAll();
#if VERBOSE
XplConsolePrintf("\rIMAPD: Shutting down %d session threads\r\n", XplSafeRead(Imap.session.threads.inUse));
#endif