Skip to content

Commit 5502014

Browse files
committed
* Coroutine tests fixed.
Bug in active coroutine counter state fixed. Coroutine finalization code optimized.
1 parent c04774c commit 5502014

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

scope.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,10 @@ static zend_always_inline bool try_to_handle_exception(
13891389
static void async_scope_call_finally_handlers_dtor(finally_handlers_context_t *context)
13901390
{
13911391
zend_async_scope_t *scope = context->target;
1392+
if (ZEND_ASYNC_EVENT_REF(&scope->event) > 0) {
1393+
ZEND_ASYNC_EVENT_DEL_REF(&scope->event);
1394+
}
1395+
13921396
scope->try_to_dispose(scope);
13931397
context->target = NULL;
13941398
}

tests/scope/018-scope_onFinally_composite_exception.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ $scope->dispose();
4343

4444
?>
4545
--EXPECT--
46-
Caught single exception: Exception - Original exception
4746
Caught CompositeException
4847
Number of exceptions: 3
4948
Exception 1: Exception - First exception

0 commit comments

Comments
 (0)