Commit 939957b3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Set the poll'ed fd to -1 when we halfclose the fd to avoid

an infinite loop on certain OS's.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2057 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent daf52caa
......@@ -52,6 +52,7 @@ rdf(struct pollfd *fds, int idx)
if (i <= 0 || fds[1-idx].events == 0) {
AZ(shutdown(fds[idx].fd, SHUT_RD));
AZ(shutdown(fds[1-idx].fd, SHUT_WR));
fds[idx].fd = -1;
fds[idx].events = 0;
return;
}
......@@ -60,6 +61,7 @@ rdf(struct pollfd *fds, int idx)
if (j != i) {
AZ(shutdown(fds[idx].fd, SHUT_WR));
AZ(shutdown(fds[1-idx].fd, SHUT_RD));
fds[1-idx].fd = -1;
fds[1-idx].events = 0;
return;
}
......
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