aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/websocket/websocket.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-01-08 20:34:26 -0800
committerGarrett D'Amore <garrett@damore.org>2020-01-08 21:16:30 -0800
commitb21d7805523a407a14567017edbdef57ca81781f (patch)
treee07f08bdc047ee4dfb057b670766e3de5bf2f981 /src/supplemental/websocket/websocket.c
parent8479b4c8861c77cfd9eb64e724615605bdd1cbcb (diff)
downloadnng-b21d7805523a407a14567017edbdef57ca81781f.tar.gz
nng-b21d7805523a407a14567017edbdef57ca81781f.tar.bz2
nng-b21d7805523a407a14567017edbdef57ca81781f.zip
fixes #1094 Consider in-lining task and aio
This only does it for rep, but it also has changes that should increase the overall test coverage for the REP protocol
Diffstat (limited to 'src/supplemental/websocket/websocket.c')
-rw-r--r--src/supplemental/websocket/websocket.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/supplemental/websocket/websocket.c b/src/supplemental/websocket/websocket.c
index c7d3622c..df4a0834 100644
--- a/src/supplemental/websocket/websocket.c
+++ b/src/supplemental/websocket/websocket.c
@@ -1230,11 +1230,11 @@ ws_fini(void *arg)
nni_strfree(ws->reqhdrs);
nni_strfree(ws->reshdrs);
- nni_aio_fini(ws->rxaio);
- nni_aio_fini(ws->txaio);
- nni_aio_fini(ws->closeaio);
- nni_aio_fini(ws->httpaio);
- nni_aio_fini(ws->connaio);
+ nni_aio_free(ws->rxaio);
+ nni_aio_free(ws->txaio);
+ nni_aio_free(ws->closeaio);
+ nni_aio_free(ws->httpaio);
+ nni_aio_free(ws->connaio);
nni_mtx_fini(&ws->mtx);
NNI_FREE_STRUCT(ws);
}
@@ -1411,11 +1411,11 @@ ws_init(nni_ws **wsp)
nni_aio_list_init(&ws->sendq);
nni_aio_list_init(&ws->recvq);
- if (((rv = nni_aio_init(&ws->closeaio, ws_close_cb, ws)) != 0) ||
- ((rv = nni_aio_init(&ws->txaio, ws_write_cb, ws)) != 0) ||
- ((rv = nni_aio_init(&ws->rxaio, ws_read_cb, ws)) != 0) ||
- ((rv = nni_aio_init(&ws->httpaio, ws_http_cb, ws)) != 0) ||
- ((rv = nni_aio_init(&ws->connaio, ws_conn_cb, ws)) != 0)) {
+ if (((rv = nni_aio_alloc(&ws->closeaio, ws_close_cb, ws)) != 0) ||
+ ((rv = nni_aio_alloc(&ws->txaio, ws_write_cb, ws)) != 0) ||
+ ((rv = nni_aio_alloc(&ws->rxaio, ws_read_cb, ws)) != 0) ||
+ ((rv = nni_aio_alloc(&ws->httpaio, ws_http_cb, ws)) != 0) ||
+ ((rv = nni_aio_alloc(&ws->connaio, ws_conn_cb, ws)) != 0)) {
ws_fini(ws);
return (rv);
}