mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-10-07 00:13:01 +08:00
fix: exit(), die() and uncaught exceptions must stop the worker
This commit is contained in:
@@ -431,10 +431,12 @@ PHP_FUNCTION(frankenphp_handle_request) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If an exception occurred, print the message to the client before
|
* If an exception occurred, print the message to the client before
|
||||||
* closing the connection
|
* closing the connection and bailout.
|
||||||
*/
|
*/
|
||||||
if (EG(exception)) {
|
if (EG(exception) && !zend_is_unwind_exit(EG(exception)) &&
|
||||||
|
!zend_is_graceful_exit(EG(exception))) {
|
||||||
zend_exception_error(EG(exception), E_ERROR);
|
zend_exception_error(EG(exception), E_ERROR);
|
||||||
|
zend_bailout();
|
||||||
}
|
}
|
||||||
|
|
||||||
frankenphp_worker_request_shutdown();
|
frankenphp_worker_request_shutdown();
|
||||||
|
Reference in New Issue
Block a user