diff options
| author | Bertrand <1984775+bertrand-@users.noreply.github.com> | 2018-11-17 17:25:50 +0000 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-11-17 09:25:50 -0800 |
| commit | dda1515cd08c23e056a1a25768c59bdafe11fe6b (patch) | |
| tree | 35d25ebdecc1b795d6ec3e30781b70cee0fcdf65 | |
| parent | 25fe93b15d322bbe288e49acfc63002f8071158b (diff) | |
| download | nng-dda1515cd08c23e056a1a25768c59bdafe11fe6b.tar.gz nng-dda1515cd08c23e056a1a25768c59bdafe11fe6b.tar.bz2 nng-dda1515cd08c23e056a1a25768c59bdafe11fe6b.zip | |
fixes #789 Websocket ping request crash
| -rw-r--r-- | src/supplemental/websocket/websocket.c | 3 |
1 files changed, 0 insertions, 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 |
