[master] b5646ee Only check errno if write(2) failed.

Poul-Henning Kamp phk at FreeBSD.org
Wed Apr 11 07:20:15 UTC 2018


commit b5646ee4172f1e9b94fd60c9dafb114d2d6a5dad
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Apr 11 07:18:36 2018 +0000

    Only check errno if write(2) failed.
    
    Hopefully this...
    
    Fixes	#2605

diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c
index edb9907..c88fffd 100644
--- a/bin/varnishd/http1/cache_http1_fsm.c
+++ b/bin/varnishd/http1/cache_http1_fsm.c
@@ -271,7 +271,8 @@ http1_minimal_response(struct req *req, uint16_t status)
 	if (wl > 0)
 		req->acct.resp_hdrbytes += wl;
 	if (wl != l) {
-		VTCP_Assert(1);
+		if (wl < 0)
+			VTCP_Assert(1);
 		if (!req->doclose)
 			req->doclose = SC_REM_CLOSE;
 		return (-1);


More information about the varnish-commit mailing list