Commit 2937acda authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use TCP_close() to properly ignore the "canonical" TCP legal errno values

consistently.

Fixes #297



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3127 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent e4e766f2
......@@ -87,7 +87,7 @@ client_thread(void *priv)
vtc_log(vl, 3, "Connected to %s fd is %d", c->connect, fd);
http_process(vl, c->spec, fd, 1);
vtc_log(vl, 3, "Closing fd %d", fd);
AZ(close(fd));
TCP_close(&fd);
vtc_log(vl, 2, "Ending");
return (NULL);
......
......@@ -98,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));
assert(close(fd) == 0 || errno == ECONNRESET);
TCP_close(&fd);
}
vtc_log(vl, 2, "Ending");
return (NULL);
......@@ -177,7 +177,7 @@ server_wait(struct server *s)
exit (1);
}
s->tp = 0;
AZ(close(s->sock));
TCP_close(&s->sock);
s->sock = -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment