Also WIN32 side

This commit is contained in:
Xinchen Hui 2016-01-29 20:38:50 -08:00
parent 01ff25970f
commit 3dadd654cf

View file

@ -1277,11 +1277,11 @@ void fcgi_close(fcgi_request *req, int force, int destroy)
DisconnectNamedPipe(pipe); DisconnectNamedPipe(pipe);
} else { } else {
if (!force) { if (!force) {
fcgi_header buf; char buf[8];
shutdown(req->fd, 1); shutdown(req->fd, 1);
/* read the last FCGI_STDIN header (it may be omitted) */ /* read any remaining data, it may be omitted */
recv(req->fd, (char *)(&buf), sizeof(buf), 0); while (recv(req->fd, buf, sizeof(buf), 0) > 0) {}
} }
closesocket(req->fd); closesocket(req->fd);
} }