From 56897e20a3d547a94ff8442f3133b2a5a0a21c62 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Wed, 10 Apr 2019 13:51:37 +0200 Subject: [PATCH] BUG/MEDIUM: streams: Only re-run process_stream if we're in a connected state. In process_stream(), only try again when there's the SI_FL_ERR flag and we're in a connected state, otherwise we can loop forever. It used to work because si_update_both() bogusly removed the SI_FL_ERR flag, and it would never be set at this point. Now it does, so take that into account. Many, many thanks to Maciej Zdeb for reporting the problem, and helping investigating it. This should be backported to 1.9. --- src/stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stream.c b/src/stream.c index cac9a3664..764c5f32e 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2502,7 +2502,8 @@ redo: if (si_f->state == SI_ST_DIS || si_f->state != si_f_prev_state || si_b->state == SI_ST_DIS || si_b->state != si_b_prev_state || - ((si_f->flags | si_b->flags) & SI_FL_ERR) || + ((si_f->flags & SI_FL_ERR) && si_f->state != SI_ST_CLO) || + ((si_b->flags & SI_FL_ERR) && si_b->state != SI_ST_CLO) || (((req->flags ^ rqf_last) | (res->flags ^ rpf_last)) & CF_MASK_ANALYSER)) goto redo; -- 2.47.3