Skip to content

Commit

Permalink
win: fix uv_udp_recv_start() error translation
Browse files Browse the repository at this point in the history
PR-URL: #1979
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
squeek502 authored and cjihrig committed Sep 18, 2018
1 parent 8813dca commit 57b3363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/win/udp.c
Expand Up @@ -366,15 +366,15 @@ 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,
(const struct sockaddr*) &uv_addr_ip4_any_,
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);
Expand Down

1 comment on commit 57b3363

@cjihrig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed this:

Fixes: #1978

Please sign in to comment.