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:
Yousong Zhou 2015-06-04 21:41:42 +08:00 committed by Felix Fietkau
parent cead67c804
commit 8964d77f80

View file

@ -50,6 +50,9 @@ static void ustream_fd_read_pending(struct ustream_fd *sf, bool *more)
char *buf; char *buf;
do { do {
if (s->read_blocked)
break;
buf = ustream_reserve(s, 1, &buflen); buf = ustream_reserve(s, 1, &buflen);
if (!buf) if (!buf)
break; break;