Permalink
Browse files

Upgrade libuv to d91b501

  • Loading branch information...
1 parent 2c79f13 commit d3426789d2d78246328d4f8116a31afdd5b4fe3a @ry ry committed May 23, 2011
Showing with 9 additions and 7 deletions.
  1. +1 −6 deps/uv/test/test-timer-again.c
  2. +8 −1 deps/uv/uv-unix.c
@@ -77,12 +77,7 @@ static void repeat_2_cb(uv_handle_t* handle, int status) {
repeat_2_cb_called++;
if (uv_timer_get_repeat(handle) == 0) {
- /* XXX Libev does considers the timer active here.
- * I'm not saying it must be this way, but we should consider what
- * exactly the semantics of uv_is_active() should be. Is a timer that's
- * initialized but stopped active?
- */
- ASSERT(uv_is_active(handle));
+ ASSERT(!uv_is_active(handle));
uv_close(handle);
return;
}
View
@@ -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;

0 comments on commit d342678

Please sign in to comment.