projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ustream-fd: fix logic invert of write polling.
[project/libubox.git]
/
ustream-fd.c
diff --git
a/ustream-fd.c
b/ustream-fd.c
index
c8f0ef9
..
bc44d4a
100644
(file)
--- a/
ustream-fd.c
+++ b/
ustream-fd.c
@@
-66,8
+66,9
@@
static void ustream_fd_read_pending(struct ustream_fd *sf, bool *more)
}
if (!len) {
}
if (!len) {
+ if (!s->eof)
+ ustream_state_change(s);
s->eof = true;
s->eof = true;
- ustream_state_change(s);
ustream_fd_set_uloop(s, false);
return;
}
ustream_fd_set_uloop(s, false);
return;
}
@@
-118,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) {
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);
}
ustream_fd_set_uloop(s, false);
}