From: Timo Sirainen Date: Fri, 13 Apr 2018 10:33:56 +0000 (+0300) Subject: po3pc: Handle unexpected server disconnections without assert-crash X-Git-Tag: 2.2.36.rc1~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10d49b063ea05ffca2585f7590017ed2f6664807;p=thirdparty%2Fdovecot%2Fcore.git po3pc: Handle unexpected server disconnections without assert-crash Fixes: Panic: file pop3c-client.c: line 308 (pop3c_client_wait_one): assertion failed: (client->fd != -1 || client->state == POP3C_CLIENT_STATE_CONNECTING) --- diff --git a/src/lib-storage/index/pop3c/pop3c-client.c b/src/lib-storage/index/pop3c/pop3c-client.c index 93f0c0d15a..f833dfc117 100644 --- a/src/lib-storage/index/pop3c/pop3c-client.c +++ b/src/lib-storage/index/pop3c/pop3c-client.c @@ -302,6 +302,7 @@ void pop3c_client_wait_one(struct pop3c_client *client) array_count(&client->commands) > 0) { while (array_count(&client->commands) > 0) pop3c_client_async_callback_disconnected(client); + return; } i_assert(client->fd != -1 ||