From: Stephan Bosch Date: Tue, 28 Apr 2020 21:59:39 +0000 (+0200) Subject: lib-http: test-http-client-errors - Make "retry payload" test more reliable. X-Git-Tag: 2.3.11.2~121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=949fd14bb6f43d91da9d8e5d5023e736a412c54f;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-client-errors - Make "retry payload" test more reliable. --- diff --git a/src/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c index b370197866..fb4ae9ad8d 100644 --- a/src/lib-http/test-http-client-errors.c +++ b/src/lib-http/test-http-client-errors.c @@ -1026,10 +1026,11 @@ static void test_retry_payload_input(struct server_connection *conn) i_fatal("server: Stream error: %s", i_stream_get_error(conn->conn.input)); } - if (conn->conn.input->eof) - i_fatal("server: Client stream ended prematurely"); - if (line == NULL) + if (line == NULL) { + if (conn->conn.input->eof) + i_fatal("server: Client stream ended prematurely"); return; + } i_assert(ctx->eoh);