mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ws role: wsi ws may not have been allocated by time of close
This commit is contained in:
parent
3be0c5dfee
commit
fff8daa898
1 changed files with 3 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue