From 45d09f5eac1e79ffd0c987813d0d24dbaba30275 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 11 Sep 2006 07:23:40 +0000 Subject: [PATCH] Don't try to do safe connection close in case of FastCGI protocol error --- sapi/cgi/fastcgi.c | 8 +++++--- 1 file 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; -- 2.50.1