ustream-fd: stop trying to read when s->read_blocked is set.
User's s->notify_read is called in ustream_fill_read(). If s->read_blocked is set there, then stop reading more. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
parent
cead67c804
commit
8964d77f80
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@ static void ustream_fd_read_pending(struct ustream_fd *sf, bool *more)
|
|||
char *buf;
|
||||
|
||||
do {
|
||||
if (s->read_blocked)
|
||||
break;
|
||||
|
||||
buf = ustream_reserve(s, 1, &buflen);
|
||||
if (!buf)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue