From ff9a24de1cd7017ead6d0e50bec1fda09157cc9b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 29 Jun 2017 10:13:29 +0800 Subject: [PATCH] parsing: if we ended on a set of headers and read a new buffer mark as more_rx_waiting to avoid dropping the ah --- lib/server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/server.c b/lib/server.c index 3bfd1de1..18734694 100644 --- a/lib/server.c +++ b/lib/server.c @@ -2238,6 +2238,13 @@ lws_server_socket_service(struct lws_context *context, struct lws *wsi, ah->rxlen = ah->rxpos = 0; goto try_pollout; } + + /* + * make sure ah does not get detached if we + * have live data in the rx + */ + if (ah->rxlen) + wsi->more_rx_waiting = 1; } if (!(ah->rxpos != ah->rxlen && ah->rxlen)) {