Stop the loop on exception so that execution can continue with the exception

This commit is contained in:
Bob Weinand 2020-02-15 20:53:51 +01:00
parent 23f89b231f
commit 1a9192c3e2

View File

@ -1360,6 +1360,10 @@ static int php_uv_do_callback2(zval *retval_ptr, php_uv_t *uv, zval *params, int
#endif
//zend_fcall_info_args_clear(&uv->callback[type]->fci, 0);
if (EG(exception)) {
uv_stop(uv->uv.handle.loop);
}
return error;
}
@ -1442,6 +1446,10 @@ static int php_uv_do_callback3(zval *retval_ptr, php_uv_t *uv, zval *params, int
//zend_fcall_info_args_clear(&uv->callback[type]->fci, 0);
if (EG(exception)) {
uv_stop(uv->uv.handle.loop);
}
return error;
}
#endif
@ -1543,6 +1551,10 @@ static void php_uv_write_cb(uv_write_t* req, int status)
php_uv_do_callback(&retval, wr->cb, params, 2 TSRMLS_CC);
if (EG(exception)) {
uv_stop(uv->uv.handle.loop);
}
PHP_UV_DEBUG_OBJ_DEL_REFCOUNT(uv_write_cb, uv);
zval_ptr_dtor(&params[0]);
zval_ptr_dtor(&params[1]);