You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix race condition in http reverse proxy for websockets
When a WebSocket connection is established through the lws http reverse proxy, the
LWS_CALLBACK_ESTABLISHED callback was being called immediately. Under load, this
could lead to a race condition where the user code would write to the socket before
the connection was fully established on the other side of the proxy, causing the
connection to be dropped.
This patch fixes the issue by deferring the LWS_CALLBACK_ESTABLISHED
callback for proxied WebSocket connections. An lws_sul is added in order to
ensure the caller completed setting up the proxy connection before we try
to do anything with it.
0 commit comments