diff options
Diffstat (limited to 'src/transport/ws/websocket.c')
| -rw-r--r-- | src/transport/ws/websocket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport/ws/websocket.c b/src/transport/ws/websocket.c index 977119a2..05cb9513 100644 --- a/src/transport/ws/websocket.c +++ b/src/transport/ws/websocket.c @@ -119,6 +119,8 @@ ws_pipe_recv_cancel(nni_aio *aio, int rv) return; } nni_aio_cancel(p->rxaio, rv); + p->user_rxaio = NULL; + nni_aio_finish_error(aio, rv); nni_mtx_unlock(&p->mtx); } @@ -147,9 +149,9 @@ ws_pipe_send_cancel(nni_aio *aio, int rv) nni_mtx_unlock(&p->mtx); return; } - // This aborts the upper send, which will call back with an error - // when it is done. + p->user_txaio = NULL; nni_aio_cancel(p->txaio, rv); + nni_aio_finish_error(aio, rv); nni_mtx_unlock(&p->mtx); } |
