]> err.no Git - varnish/commitdiff
Accept ECONNRESET when closing sockets during cleanup.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 31 Jul 2008 09:52:27 +0000 (09:52 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 31 Jul 2008 09:52:27 +0000 (09:52 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3038 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/vtc_server.c

index 97bfdfc89297f1d394c37dfc6de0de4272f4bed1..71097d63a458d5e88a007e6df4260f313cc1c4a7 100644 (file)
@@ -28,6 +28,7 @@
 
 
 #include <stdio.h>
+#include <errno.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -97,7 +98,7 @@ server_thread(void *priv)
                http_process(vl, s->spec, fd, 0);
                vtc_log(vl, 3, "shutting fd %d", fd);
                AZ(shutdown(fd, SHUT_WR));
-               AZ(close(fd));
+               assert(close(fd) == 0 || errno == ECONNRESET);
        }
        vtc_log(vl, 2, "Ending");
        return (NULL);