parsing: if we ended on a set of headers and read a new buffer mark as more_rx_waitin...
authorAndy Green <andy@warmcat.com>
Thu, 29 Jun 2017 02:13:29 +0000 (10:13 +0800)
committerAndy Green <andy@warmcat.com>
Thu, 29 Jun 2017 02:13:29 +0000 (10:13 +0800)
lib/server.c

index 3bfd1de..1873469 100644 (file)
@@ -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)) {