Skip to content
Snippets Groups Projects
Commit fff8daa8 authored by Andy Green's avatar Andy Green
Browse files

ws role: wsi ws may not have been allocated by time of close

parent 3be0c5df
No related branches found
No related tags found
No related merge requests found
......@@ -1464,6 +1464,9 @@ rops_service_flag_pending_ws(struct lws_context *context, int tsi)
static int
rops_close_via_role_protocol_ws(struct lws *wsi, enum lws_close_status reason)
{
if (!wsi->ws)
return 0;
if (!wsi->ws->close_in_ping_buffer_len && /* already a reason */
(reason == LWS_CLOSE_STATUS_NOSTATUS ||
reason == LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment