Skip to content

Commit 5822582

Browse files
committed
#32: + Cannot resume when there is an active exception in the engine.
1 parent 9779f45 commit 5822582

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Zend/zend_async_API.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,12 @@ ZEND_API void zend_async_resume_when(
668668
zend_coroutine_event_callback_t *event_callback
669669
)
670670
{
671+
ZEND_ASSERT(EG(exception) == NULL && "Cannot resume when there is an active exception in the engine.");
672+
673+
if (UNEXPECTED(EG(exception))) {
674+
return;
675+
}
676+
671677
bool locally_allocated_callback = false;
672678

673679
if (UNEXPECTED(ZEND_ASYNC_EVENT_IS_CLOSED(event))) {

0 commit comments

Comments
 (0)