From 70e7c09bcb846e51edefa8baab2018e93d77f8e2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 31 May 2013 11:17:02 +0200 Subject: [PATCH] ustream: only report a write error once via state_change callback Signed-off-by: Felix Fietkau --- ustream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)