From a9a23dc28ec73912dfaae4fc2a8d815e20578695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 28 Mar 2013 15:50:42 +0100 Subject: [PATCH] unix: don't clear flags after closing UDP handle --- src/unix/udp.c | 1 - test/test-udp-send-and-recv.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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++; }