From dda1515cd08c23e056a1a25768c59bdafe11fe6b Mon Sep 17 00:00:00 2001 From: Bertrand <1984775+bertrand-@users.noreply.github.com> Date: Sat, 17 Nov 2018 17:25:50 +0000 Subject: fixes #789 Websocket ping request crash --- src/supplemental/websocket/websocket.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/supplemental/websocket/websocket.c b/src/supplemental/websocket/websocket.c index f0a1a269..c214e6d7 100644 --- a/src/supplemental/websocket/websocket.c +++ b/src/supplemental/websocket/websocket.c @@ -687,10 +687,8 @@ ws_send_control(nni_ws *ws, uint8_t op, uint8_t *buf, size_t len) // Note that we do not care if this works or not. So no AIO needed. - nni_mtx_lock(&ws->mtx); if ((ws->closed) || (ws_msg_init_control(&wm, ws, op, buf, len) != 0)) { - nni_mtx_unlock(&ws->mtx); return; } @@ -698,7 +696,6 @@ ws_send_control(nni_ws *ws, uint8_t op, uint8_t *buf, size_t len) // the close frame or other ping/pong requests. Oh well.) nni_list_prepend(&ws->txmsgs, wm); ws_start_write(ws); - nni_mtx_unlock(&ws->mtx); } int -- cgit v1.2.3-70-g09d2