From 10473597c554a5d2d21b012e9a83b60f34767419 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 29 Jan 2020 17:03:55 +0000 Subject: [PATCH] stream: Fix flushing when tls is disabled --- src/stream.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stream.c b/src/stream.c index d0ca3f2..94ecb99 100644 --- a/src/stream.c +++ b/src/stream.c @@ -229,11 +229,14 @@ static void stream__on_readable(struct stream* self) { switch (self->state) { case STREAM_STATE_NORMAL: + /* fallthrough */ #ifdef ENABLE_TLS case STREAM_STATE_TLS_READY: +#endif if (self->on_event) self->on_event(self, STREAM_EVENT_READ); break; +#ifdef ENABLE_TLS case STREAM_STATE_TLS_HANDSHAKE: stream__try_tls_accept(self); break; @@ -248,10 +251,13 @@ static void stream__on_writable(struct stream* self) { switch (self->state) { case STREAM_STATE_NORMAL: + /* fallthrough */ #ifdef ENABLE_TLS case STREAM_STATE_TLS_READY: +#endif stream__flush(self); break; +#ifdef ENABLE_TLS case STREAM_STATE_TLS_HANDSHAKE: stream__try_tls_accept(self); break;