File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -701,16 +701,13 @@ ZEND_API void zend_async_resume_when(
701
701
zend_coroutine_event_callback_t * event_callback
702
702
)
703
703
{
704
- ZEND_ASSERT (EG (exception ) == NULL && "Cannot resume when there is an active exception in the engine." );
705
-
706
- if (UNEXPECTED (EG (exception ))) {
707
- return ;
708
- }
704
+ zend_exception_save ();
709
705
710
706
bool locally_allocated_callback = false;
711
707
712
708
if (UNEXPECTED (ZEND_ASYNC_EVENT_IS_CLOSED (event ))) {
713
709
zend_throw_error (NULL , "The event cannot be used after it has been terminated" );
710
+ zend_exception_restore ();
714
711
return ;
715
712
}
716
713
@@ -721,6 +718,7 @@ ZEND_API void zend_async_resume_when(
721
718
event -> dispose (event );
722
719
}
723
720
721
+ zend_exception_restore ();
724
722
return ;
725
723
}
726
724
@@ -755,6 +753,7 @@ ZEND_API void zend_async_resume_when(
755
753
event -> dispose (event );
756
754
}
757
755
756
+ zend_exception_restore ();
758
757
return ;
759
758
}
760
759
@@ -799,6 +798,8 @@ ZEND_API void zend_async_resume_when(
799
798
}
800
799
}
801
800
}
801
+
802
+ zend_exception_restore ();
802
803
}
803
804
804
805
ZEND_API void zend_async_waker_callback_resolve (
You can’t perform that action at this time.
0 commit comments