unix: set proper loop errno for udp write req cb
Harmonize with stream.c and tcp.c: when a handle is closed that has pending writes queued up, run the callbacks with loop->err.code set to UV_ECANCELED, not UV_EINTR.
This commit is contained in:
parent
665a316aa9
commit
190db15638
@ -68,8 +68,7 @@ void uv__udp_finish_close(uv_udp_t* handle) {
|
||||
req->bufs = NULL;
|
||||
|
||||
if (req->send_cb) {
|
||||
/* FIXME proper error code like UV_EABORTED */
|
||||
uv__set_artificial_error(handle->loop, UV_EINTR);
|
||||
uv__set_artificial_error(handle->loop, UV_ECANCELED);
|
||||
req->send_cb(req, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ static void send_cb(uv_udp_send_t* req, int status) {
|
||||
|
||||
if (status != 0) {
|
||||
ASSERT(status == -1);
|
||||
ASSERT(uv_last_error(req->handle->loop).code == UV_EINTR);
|
||||
ASSERT(uv_last_error(req->handle->loop).code == UV_ECANCELED);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user