Fixed a bug in the MT ioloop.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 1 Jan 2009 04:03:37 +0000 (05:03 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 1 Jan 2009 04:03:37 +0000 (05:03 +0100)
lib/mtio.c

index 2a46369..3bb7b86 100644 (file)
@@ -115,7 +115,7 @@ void ioloop(void)
                ev |= EV_WRITE;
            if(FD_ISSET(bl->fd, &efds))
                ev = -1;
-           if(ev != 0)
+           if((ev < 0) || (ev & bl->ev))
                resume(bl->th, ev);
            else if((bl->to != 0) && (bl->to <= now))
                resume(bl->th, 0);