From 36be1040ebdfbcf5dc7f266fb542649dd145d19f Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Mon, 23 Jul 2001 01:03:22 +0000 Subject: Use synchronous php_request_shutdown in the standard case and let the pool cleanup function only become effective, when an error has occured. This fixes the problem that the request_conn was already dead when the request_shutdown was reached. --- sapi/apache/mod_php4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sapi/apache/mod_php4.c') diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 53ddb92d87..a58df34143 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -312,9 +312,11 @@ static void php_apache_request_shutdown(void *dummy) SLS_FETCH(); APLS_FETCH(); - AP(in_request)=0; SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */ - php_request_shutdown(dummy); + if (AP(in_request)) { + AP(in_request) = 0; + php_request_shutdown(dummy); + } } /* }}} */ -- cgit v1.2.1