File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1282,7 +1282,7 @@ static void zend_fiber_object_destroy(zend_object *object)
12821282 fiber -> coroutine = NULL ;
12831283 coroutine -> extended_data = NULL ;
12841284
1285- if (ZEND_COROUTINE_IS_FINISHED (coroutine )) {
1285+ if (ZEND_COROUTINE_IS_FINISHED (coroutine ) || false == ZEND_COROUTINE_IS_STARTED ( coroutine ) ) {
12861286 /*
12871287 * If fcall is not NULL, ownership was NOT taken by
12881288 * coroutine_entry_point (coroutine did not start execution).
@@ -1317,7 +1317,10 @@ static void zend_fiber_object_destroy(zend_object *object)
13171317 );
13181318
13191319 ZEND_ASYNC_CANCEL (coroutine , exception , true);
1320- ZEND_ASYNC_EVENT_RELEASE (& coroutine -> event );
1320+
1321+ if (ZEND_COROUTINE_IS_STARTED (coroutine )) {
1322+ ZEND_ASYNC_EVENT_RELEASE (& coroutine -> event );
1323+ }
13211324
13221325 return ;
13231326 }
You can’t perform that action at this time.
0 commit comments