From: Felix Fietkau Date: Fri, 31 May 2013 09:18:26 +0000 (+0200) Subject: ustream: only report stream eof once via state_change callback X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=commitdiff_plain;h=2851ce7edb3247233b0d07e6d26d5a2ed0478a56;ds=sidebyside ustream: only report stream eof once via state_change callback Signed-off-by: Felix Fietkau --- diff --git a/ustream-fd.c b/ustream-fd.c index c8f0ef9..4abb530 100644 --- 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 (!s->eof) + ustream_state_change(s); s->eof = true; - ustream_state_change(s); ustream_fd_set_uloop(s, false); return; }