mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
Stop the loop on exception so that execution can continue with the exception
This commit is contained in:
parent
23f89b231f
commit
1a9192c3e2
12
php_uv.c
12
php_uv.c
@ -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(¶ms[0]);
|
||||
zval_ptr_dtor(¶ms[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user