We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a34f50 commit b22db46Copy full SHA for b22db46
1 file changed
scheduler.c
@@ -1125,7 +1125,10 @@ static zend_always_inline void scheduler_next_tick(void)
1125
zend_object **exception_ptr = &EG(exception);
1126
zend_object **prev_exception_ptr = &EG(prev_exception);
1127
1128
- ZEND_ASYNC_SCHEDULER_HEARTBEAT;
+ if (ZEND_ASYNC_G(heartbeat_handler) != NULL) {
1129
+ ZEND_ASYNC_G(heartbeat_handler)();
1130
+ TRY_HANDLE_SUSPEND_EXCEPTION();
1131
+ }
1132
1133
execute_microtasks();
1134
TRY_HANDLE_SUSPEND_EXCEPTION();
@@ -1387,6 +1390,7 @@ ZEND_STACK_ALIGNED void fiber_entry(zend_fiber_transfer *transfer)
1387
1390
1388
1391
if (*heartbeat_handler) {
1389
1392
(*heartbeat_handler)();
1393
+ TRY_HANDLE_EXCEPTION();
1394
}
1395
1396
0 commit comments