php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #63746
Patch Runkit_FPM revision 2012-12-11 22:33 UTC by tranelson at x dot com

Patch Runkit_FPM for FPM related Bug #63746

Patch version 2012-12-11 22:33 UTC

Return to Bug #63746 | Download this patch
Patch Revisions:

Developer: tranelson@x.com

diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index edd75be..d9abcce 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -836,6 +836,7 @@ static int sapi_cgi_deactivate(TSRMLS_D)
 		2. When the first call occurs and the request is not set up, flush fails on FastCGI.
 	*/
 	if (SG(sapi_started)) {
+	    if ((fcgi_request*)SG(server_context)!=0x0){ // check first to see if we have a fcgi request to finish.
 		if (
 #ifndef PHP_WIN32
 		    !parent &&
@@ -843,6 +844,7 @@ static int sapi_cgi_deactivate(TSRMLS_D)
 		    !fcgi_finish_request((fcgi_request*)SG(server_context), 0)) {
 			php_handle_aborted_connection();
 		}
+	    }
 	}
 	return SUCCESS;
 }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC