mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
Properly handle all cases of php_uv_t * for uv_stop in uv_do_callback2()
This commit is contained in:
parent
67356706aa
commit
5be79e433d
24
php_uv.c
24
php_uv.c
@ -1361,7 +1361,29 @@ static int php_uv_do_callback2(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);
|
||||
switch (type) {
|
||||
case PHP_UV_FS_CB:
|
||||
uv_stop(uv->uv.fs.loop);
|
||||
break;
|
||||
case PHP_UV_GETADDR_CB:
|
||||
uv_stop(uv->uv.addrinfo.loop);
|
||||
break;
|
||||
case PHP_UV_AFTER_WORK_CB:
|
||||
uv_stop(uv->uv.work.loop);
|
||||
break;
|
||||
case PHP_UV_SHUTDOWN_CB:
|
||||
uv_stop(uv->uv.shutdown.handle->loop);
|
||||
break;
|
||||
case PHP_UV_SEND_CB:
|
||||
uv_stop(uv->uv.udp_send.handle->loop);
|
||||
break;
|
||||
case PHP_UV_CONNECT_CB:
|
||||
case PHP_UV_PIPE_CONNECT_CB:
|
||||
uv_stop(uv->uv.connect.handle->loop);
|
||||
break;
|
||||
default:
|
||||
uv_stop(uv->uv.handle.loop);
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user