Skip to content

Commit 3dccf0a

Browse files
committed
* fix async_coroutine_execute:: bailout handler
1 parent b22db46 commit 3dccf0a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

coroutine.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ ZEND_STACK_ALIGNED void async_coroutine_execute(async_coroutine_t *coroutine)
415415
}
416416
zend_catch
417417
{
418+
is_bailout = true;
418419
should_start_graceful_shutdown = true;
419420
}
420421
zend_end_try();
@@ -426,7 +427,7 @@ ZEND_STACK_ALIGNED void async_coroutine_execute(async_coroutine_t *coroutine)
426427
ZEND_ASYNC_CURRENT_COROUTINE = NULL;
427428
}
428429

429-
return;
430+
goto exit;
430431
}
431432

432433
if (UNEXPECTED(waker->status == ZEND_ASYNC_WAKER_WAITING)) {
@@ -492,6 +493,8 @@ ZEND_STACK_ALIGNED void async_coroutine_execute(async_coroutine_t *coroutine)
492493
ZEND_ASYNC_CURRENT_COROUTINE = NULL;
493494
}
494495

496+
exit:
497+
495498
if (UNEXPECTED(should_start_graceful_shutdown)) {
496499
zend_try
497500
{

0 commit comments

Comments
 (0)