ustream-fd: fix logic invert of write polling.

ustream_write_pending() returns true if write buffer was flushed there.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou 2015-01-21 21:21:26 +08:00 committed by Felix Fietkau
parent 60236c4853
commit 73c4b4fdfe

View 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);
}