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(
701701 zend_coroutine_event_callback_t * event_callback
702702 )
703703{
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 ();
709705
710706 bool locally_allocated_callback = false;
711707
712708 if (UNEXPECTED (ZEND_ASYNC_EVENT_IS_CLOSED (event ))) {
713709 zend_throw_error (NULL , "The event cannot be used after it has been terminated" );
710+ zend_exception_restore ();
714711 return ;
715712 }
716713
@@ -721,6 +718,7 @@ ZEND_API void zend_async_resume_when(
721718 event -> dispose (event );
722719 }
723720
721+ zend_exception_restore ();
724722 return ;
725723 }
726724
@@ -755,6 +753,7 @@ ZEND_API void zend_async_resume_when(
755753 event -> dispose (event );
756754 }
757755
756+ zend_exception_restore ();
758757 return ;
759758 }
760759
@@ -799,6 +798,8 @@ ZEND_API void zend_async_resume_when(
799798 }
800799 }
801800 }
801+
802+ zend_exception_restore ();
802803}
803804
804805ZEND_API void zend_async_waker_callback_resolve (
You can’t perform that action at this time.
0 commit comments