diff --git a/src/unix/udp.c b/src/unix/udp.c index e1a12f2b..3fb8af93 100644 --- a/src/unix/udp.c +++ b/src/unix/udp.c @@ -79,7 +79,6 @@ void uv__udp_finish_close(uv_udp_t* handle) { } /* Now tear down the handle. */ - handle->flags = 0; handle->recv_cb = NULL; handle->alloc_cb = NULL; /* but _do not_ touch close_cb */ diff --git a/test/test-udp-send-and-recv.c b/test/test-udp-send-and-recv.c index 37df5b62..1ffa6aa8 100644 --- a/test/test-udp-send-and-recv.c +++ b/test/test-udp-send-and-recv.c @@ -53,6 +53,7 @@ static uv_buf_t alloc_cb(uv_handle_t* handle, size_t suggested_size) { static void close_cb(uv_handle_t* handle) { CHECK_HANDLE(handle); + ASSERT(uv_is_closing(handle)); close_cb_called++; }