win: fix uv_udp_recv_start() error translation

PR-URL: https://github.com/libuv/libuv/pull/1979
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Ryan Liptak 2018-09-05 03:40:16 -07:00 committed by cjihrig
parent 8813dca388
commit 57b3363e23
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -366,7 +366,7 @@ int uv__udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb,
int err;
if (handle->flags & UV_HANDLE_READING) {
return WSAEALREADY;
return UV_EALREADY;
}
err = uv_udp_maybe_bind(handle,
@ -374,7 +374,7 @@ int uv__udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb,
sizeof(uv_addr_ip4_any_),
0);
if (err)
return err;
return uv_translate_sys_error(err);
handle->flags |= UV_HANDLE_READING;
INCREASE_ACTIVE_COUNT(loop, handle);