ustream-fd: fix logic invert of write polling.
[project/libubox.git] / ustream-fd.c
index 4abb53053bbc2bb6440cb31051851cee71e112e2..bc44d4a825425f49e8fd9c3c63c768bf862f3e46 100644 (file)
@@ -119,7 +119,7 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, unsigned int events)
                ustream_fd_read_pending(sf, &more);
 
        if (events & ULOOP_WRITE) {
-               if (!ustream_write_pending(s))
+               if (ustream_write_pending(s))
                        ustream_fd_set_uloop(s, false);
        }