From e2b2df6d2bc00a59a5301fc9dd92ac471a920db9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 9 Jul 2011 02:49:18 +0200 Subject: [PATCH] Fix alloc-after-close error, properly disarm uv_tcp_t handle. --- src/uv-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uv-unix.c b/src/uv-unix.c index 6bffaf27..38dd4923 100644 --- a/src/uv-unix.c +++ b/src/uv-unix.c @@ -168,8 +168,8 @@ int uv_close(uv_handle_t* handle, uv_close_cb close_cb) { switch (handle->type) { case UV_TCP: tcp = (uv_tcp_t*) handle; + uv_read_stop((uv_stream_t*)tcp); ev_io_stop(EV_DEFAULT_ &tcp->write_watcher); - ev_io_stop(EV_DEFAULT_ &tcp->read_watcher); break; case UV_PREPARE: