From: Timo Sirainen Date: Mon, 24 Aug 2009 18:09:49 +0000 (-0400) Subject: auth worker server: Don't assert-crash if the whole reply doesn't come in one packet. X-Git-Tag: 2.0.alpha1~243 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bca6bb7e319f3bcbfbcb05610ebc9d01626b2323;p=thirdparty%2Fdovecot%2Fcore.git auth worker server: Don't assert-crash if the whole reply doesn't come in one packet. --HG-- branch : HEAD --- diff --git a/src/auth/auth-worker-server.c b/src/auth/auth-worker-server.c index df5c5d174e..879aae7a8b 100644 --- a/src/auth/auth-worker-server.c +++ b/src/auth/auth-worker-server.c @@ -97,6 +97,7 @@ static void auth_worker_request_send(struct auth_worker_connection *conn, o_stream_sendv(conn->output, iov, 3); + i_assert(conn->request == NULL); conn->request = request; timeout_remove(&conn->to); @@ -296,7 +297,9 @@ static void worker_input(struct auth_worker_connection *conn) } } - if (conn->shutdown && conn->request == NULL) + if (conn->request != NULL) { + /* there's still a pending request */ + } else if (conn->shutdown) auth_worker_destroy(&conn, "Max requests limit", TRUE); else auth_worker_request_send_next(conn);