lib: Fixed mblock bug for epoll.
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 18 May 2016 03:22:18 +0000 (05:22 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 18 May 2016 03:22:18 +0000 (05:22 +0200)
lib/mtio-epoll.c

index d9e794e..af7cd27 100644 (file)
@@ -166,7 +166,7 @@ struct selected mblock(time_t to, int n, struct selected *spec)
            .th = current,
        };
        if(addblock(&bls[i])) {
-           for(i--; i >= 0; i++)
+           for(i--; i >= 0; i--)
                remblock(&bls[i]);
            return((struct selected){.fd = -1, .ev = -1});
        }