From 54c95f749b10102aa5d4d9126ef706e864b1a0d7 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 23 May 2011 23:53:57 +0200 Subject: [PATCH] Unix: unbreak uv_is_active We need a test for it. --- uv-unix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/uv-unix.c b/uv-unix.c index d0511b130..c92e6492d 100644 --- a/uv-unix.c +++ b/uv-unix.c @@ -1092,10 +1092,17 @@ int uv_idle_stop(uv_handle_t* handle) { int uv_is_active(uv_handle_t* handle) { switch (handle->type) { + case UV_TIMER: + return ev_is_active(&handle->timer_watcher); + case UV_PREPARE: + return ev_is_active(&handle->prepare_watcher); + case UV_CHECK: + return ev_is_active(&handle->check_watcher); + case UV_IDLE: - return ev_is_active(handle); + return ev_is_active(&handle->idle_watcher); default: return 1;