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:
parent
60236c4853
commit
73c4b4fdfe
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, unsigned int events)
|
||||||
ustream_fd_read_pending(sf, &more);
|
ustream_fd_read_pending(sf, &more);
|
||||||
|
|
||||||
if (events & ULOOP_WRITE) {
|
if (events & ULOOP_WRITE) {
|
||||||
if (!ustream_write_pending(s))
|
if (ustream_write_pending(s))
|
||||||
ustream_fd_set_uloop(s, false);
|
ustream_fd_set_uloop(s, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue