[Libwebsockets] We met an issue when using libwebsocket and fixed it, how can I submit the patch
andy at warmcat.com
Wed Mar 4 13:53:38 CET 2020
On 3/4/20 10:28 AM, 张立峰 wrote:
> Hi, everyone:
> When using libwebsockets as a client to communicate a ws server, we
> write out many messages in a queue when receive
> a LWS_CALLBACK_CLIENT_WRITEABLE. This may cause the ws server to close
> our connection.
> We found that when lws_write return value is smaller than requested, the
> connection will be close when we use lws_write next time.
> After check the source code of libwebsockets, we found the issue cause:
> The "wsi->ws->inside_frame" is not set to "0" after wsi->buflist_out has
> been sent. This will cause the wrong coded ws frame been sent.
Thanks, I modified it a little bit for the cases ws is not enabled for
build or it's http and not ws connection, and pushed it on master and
More information about the Libwebsockets