diff options
Diffstat (limited to 'sapi/cgi/fastcgi.c')
-rw-r--r-- | sapi/cgi/fastcgi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c index ae57779b7c..4a2a73623d 100644 --- a/sapi/cgi/fastcgi.c +++ b/sapi/cgi/fastcgi.c @@ -611,10 +611,12 @@ static inline void fcgi_close(fcgi_request *req, int force, int destroy) RevertToSelf(); } #else - char buf[8]; + if (!force) { + char buf[8]; - shutdown(req->fd, 1); - while (recv(req->fd, buf, sizeof(buf), 0) > 0) {} + shutdown(req->fd, 1); + while (recv(req->fd, buf, sizeof(buf), 0) > 0) {} + } close(req->fd); #endif req->fd = -1; |