From: Felix Fietkau Date: Fri, 31 May 2013 09:17:02 +0000 (+0200) Subject: ustream: only report a write error once via state_change callback X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70e7c09bcb846e51edefa8baab2018e93d77f8e2;p=oweals%2Flibubox.git ustream: only report a write error once via state_change callback Signed-off-by: Felix Fietkau --- diff --git a/ustream.c b/ustream.c index 719af99..88f1332 100644 --- a/ustream.c +++ b/ustream.c @@ -330,8 +330,9 @@ char *ustream_get_read_buf(struct ustream *s, int *buflen) static void ustream_write_error(struct ustream *s) { + if (!s->write_error) + ustream_state_change(s); s->write_error = true; - ustream_state_change(s); } bool ustream_write_pending(struct ustream *s)