]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Removed asssert in http_client_connection_is_ready().
authorStephan Bosch <stephan@rename-it.nl>
Sun, 26 Oct 2014 16:43:57 +0000 (18:43 +0200)
committerStephan Bosch <stephan@rename-it.nl>
Sun, 26 Oct 2014 16:43:57 +0000 (18:43 +0200)
There is no reason why the input stream couldn't be full.

src/lib-http/http-client-connection.c

index e0947d9c4051023068e56a0d8fbaa9edd30dedae..304d3114bac085cdb9a66de003a0c5cfc6be0b91 100644 (file)
@@ -176,10 +176,9 @@ bool http_client_connection_is_ready(struct http_client_connection *conn)
                /* Active ioloop is different from what we saw earlier;
                   we may have missed a disconnection event on this connection.
                   Verify status by reading from connection. */
-               if ((ret=i_stream_read(conn->conn.input)) < 0) {
+               if ((ret=i_stream_read(conn->conn.input)) == -1) {
                        int stream_errno = conn->conn.input->stream_errno;
 
-                       i_assert(ret != -2);
                        i_assert(conn->conn.input->stream_errno != 0 || conn->conn.input->eof);
                        http_client_connection_abort_temp_error(&conn,
                                HTTP_CLIENT_REQUEST_ERROR_CONNECTION_LOST,