Skip to content

Commit

Permalink
ustream-fd: stop trying to read when s->read_blocked is set.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
yousong authored and Felix Fietkau committed Jun 14, 2015
1 parent cead67c commit 8964d77
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ustream-fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8964d77

Please sign in to comment.