If the final message fragment contains a payload that has to be
handled in multiple RX callbacks, until now we reported the ws
fragment header FIN state in lws_is_final_fragment().
That was correct, but it's kind of not useful to hear that the
intermediate bufferloads are "final". So now we delay
reporting the logical ws fragment FIN until the final part of
his payload is delivered.
This gets us Autobahn 1.1.6 working.
Signed-off-by: Andy Green <andy.green@linaro.org>
LWS_VISIBLE int
lws_is_final_fragment(struct lws *wsi)
{
- return wsi->u.ws.final;
+ return wsi->u.ws.final && !wsi->u.ws.rx_packet_length;
}
LWS_VISIBLE unsigned char