1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

wsproxy: send buffered data from head not tail

https://github.com/warmcat/libwebsockets/issues/1737
This commit is contained in:
Zhiwen Zheng 2019-10-28 05:04:10 +00:00 committed by Andy Green
parent 9ef5cbee01
commit 6cb9f4eb60

View file

@ -215,7 +215,7 @@ lws_callback_ws_proxy(struct lws *wsi, enum lws_callback_reasons reason,
break;
case LWS_CALLBACK_SERVER_WRITEABLE:
dll = lws_dll2_get_tail(&wsi->ws->proxy_owner);
dll = lws_dll2_get_head(&wsi->ws->proxy_owner);
if (!dll)
break;
@ -229,7 +229,7 @@ lws_callback_ws_proxy(struct lws *wsi, enum lws_callback_reasons reason,
lws_dll2_remove(dll);
lws_free(pkt);
if (lws_dll2_get_tail(&wsi->ws->proxy_owner))
if (lws_dll2_get_head(&wsi->ws->proxy_owner))
lws_callback_on_writable(wsi);
break;