[6.0] a11dce361 Collapse the MacOS case with Solaris & NetBSD in VTCP_Check()
Reza Naghibi
reza at naghibi.com
Wed Apr 28 18:19:07 UTC 2021
commit a11dce3615913d1fbeed6a0f4d28647d54f1868c
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Feb 22 19:53:27 2021 +0100
Collapse the MacOS case with Solaris & NetBSD in VTCP_Check()
Conflicts:
lib/libvarnish/vtcp.c
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 11e6c05ae..02bbe7320 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -576,18 +576,20 @@ VTCP_Check(ssize_t a)
* some time. */
if (errno == ETIMEDOUT)
return (1);
-#if (defined (__SVR4) && defined (__sun)) || defined (__NetBSD__)
- /*
- * Solaris returns EINVAL if the other end unexpectedly reset the
- * connection.
- * This is a bug in Solaris and documented behaviour on NetBSD.
- */
- if (errno == EINVAL || errno == ETIMEDOUT)
+#if (defined (__SVR4) && defined (__sun))
+ if (errno == ECONNREFUSED) // in r02702.vtc
return (1);
-#elif defined (__APPLE__)
+ if (errno == EPROTO)
+ return (1);
+#endif
+#if (defined (__SVR4) && defined (__sun)) || \
+ defined (__NetBSD__) || \
+ defined (__APPLE__)
/*
- * MacOS returns EINVAL if the other end unexpectedly reset
+ * Solaris and MacOS returns EINVAL if the other end unexpectedly reset
* the connection.
+ *
+ * On NetBSD it is documented behaviour.
*/
if (errno == EINVAL)
return (1);
More information about the varnish-commit
mailing list