about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-04-29 19:30:25 +0000
committerEric Wong <normalperson@yhbt.net>2013-04-29 21:01:02 +0000
commit98af77f834ca0a821a091085a3fdc5e645f704fc (patch)
tree871879f43127f776910440b4f36c1548088c2aab
parentd0f40416ce43a9148a4a2f397f6bc606a39688b2 (diff)
downloadsleepy_penguin-98af77f834ca0a821a091085a3fdc5e645f704fc.tar.gz
Having a timeout does not make sense if not retrieving events,
so avoid potentially triggering bugs or strange behavior between
different kqueue implementations.
-rw-r--r--ext/sleepy_penguin/kqueue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/sleepy_penguin/kqueue.c b/ext/sleepy_penguin/kqueue.c
index 8e33592..78a13c3 100644
--- a/ext/sleepy_penguin/kqueue.c
+++ b/ext/sleepy_penguin/kqueue.c
@@ -317,6 +317,7 @@ static VALUE sp_kevent(int argc, VALUE *argv, VALUE self)
                         rb_raise(rb_eArgError,
                                 "nevents specified but block not given");
                 nevents = 0;
+                timeout = INT2FIX(0);
         }
 
         kpt = kpt_get(self, nchanges, nevents);