]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth worker server: Don't assert-crash if the whole reply doesn't come in one packet.
authorTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2009 18:09:49 +0000 (14:09 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2009 18:09:49 +0000 (14:09 -0400)
--HG--
branch : HEAD

src/auth/auth-worker-server.c

index df5c5d174e718f83f67d8e8777e06269d239b23d..879aae7a8bd7bd10d191c9d22d7095df889a7c53 100644 (file)
@@ -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);