[6.0] e8f20395e Enable the use of VTCP_Assert in v1f_read()
Reza Naghibi
reza at naghibi.com
Thu Apr 22 15:55:06 UTC 2021
commit e8f20395e243235332ea1be54c1586d8b2a15360
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Oct 7 15:35:13 2020 +0200
Enable the use of VTCP_Assert in v1f_read()
Now that VTCP_Assert() accepts EAGAIN as a legal errno value for read()
errors, uncomment this check.
diff --git a/bin/varnishd/http1/cache_http1_vfp.c b/bin/varnishd/http1/cache_http1_vfp.c
index 7b03ca8ce..374bcac6a 100644
--- a/bin/varnishd/http1/cache_http1_vfp.c
+++ b/bin/varnishd/http1/cache_http1_vfp.c
@@ -43,6 +43,7 @@
#include "cache_http1.h"
#include "vct.h"
+#include "vtcp.h"
/*--------------------------------------------------------------------
* Read up to len bytes, returning pipelined data first.
@@ -75,7 +76,7 @@ v1f_read(const struct vfp_ctx *vc, struct http_conn *htc, void *d, ssize_t len)
if (len > 0) {
i = read(*htc->rfd, p, len);
if (i < 0) {
- // XXX: VTCP_Assert(i); // but also: EAGAIN
+ VTCP_Assert(i);
VSLb(vc->wrk->vsl, SLT_FetchError,
"%s", strerror(errno));
return (i);
More information about the varnish-commit
mailing list