aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-15 17:13:36 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-15 17:13:36 -0700
commit34ee6ece5adf86a324c89ed4dc96e77ad0dac893 (patch)
tree0f17bc7acb142173491422a9013842c74fb36836 /src/protocol/reqrep
parentbef8ea546a7efd2726f51207e26eafc75979573d (diff)
downloadnng-34ee6ece5adf86a324c89ed4dc96e77ad0dac893.tar.gz
nng-34ee6ece5adf86a324c89ed4dc96e77ad0dac893.tar.bz2
nng-34ee6ece5adf86a324c89ed4dc96e77ad0dac893.zip
Bus, Req/Rep, and Surv/Resp should use aio_cancel instead of aio_stop.
Diffstat (limited to 'src/protocol/reqrep')
-rw-r--r--src/protocol/reqrep/rep.c10
-rw-r--r--src/protocol/reqrep/req.c11
2 files changed, 11 insertions, 10 deletions
diff --git a/src/protocol/reqrep/rep.c b/src/protocol/reqrep/rep.c
index f35726d8..1e4ee4ef 100644
--- a/src/protocol/reqrep/rep.c
+++ b/src/protocol/reqrep/rep.c
@@ -114,7 +114,7 @@ nni_rep_sock_close(void *arg)
{
nni_rep_sock *rep = arg;
- nni_aio_stop(&rep->aio_getq);
+ nni_aio_cancel(&rep->aio_getq, NNG_ECLOSED);
}
static int
@@ -191,10 +191,10 @@ nni_rep_pipe_stop(void *arg)
nni_rep_pipe *rp = arg;
nni_rep_sock *rep = rp->rep;
- nni_aio_stop(&rp->aio_getq);
- nni_aio_stop(&rp->aio_putq);
- nni_aio_stop(&rp->aio_send);
- nni_aio_stop(&rp->aio_recv);
+ nni_aio_cancel(&rp->aio_getq, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_putq, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_send, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_recv, NNG_ECANCELED);
nni_msgq_close(rp->sendq);
nni_idhash_remove(rep->pipes, nni_pipe_id(rp->pipe));
diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c
index f77700f5..f13094ff 100644
--- a/src/protocol/reqrep/req.c
+++ b/src/protocol/reqrep/req.c
@@ -1,5 +1,6 @@
//
// Copyright 2017 Garrett D'Amore <garrett@damore.org>
+// Copyright 2017 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -209,11 +210,11 @@ nni_req_pipe_stop(void *arg)
nni_req_pipe *rp = arg;
nni_req_sock *req = rp->req;
- nni_aio_stop(&rp->aio_getq);
- nni_aio_stop(&rp->aio_putq);
- nni_aio_stop(&rp->aio_recv);
- nni_aio_stop(&rp->aio_sendcooked);
- nni_aio_stop(&rp->aio_sendraw);
+ nni_aio_cancel(&rp->aio_getq, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_putq, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_recv, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_sendcooked, NNG_ECANCELED);
+ nni_aio_cancel(&rp->aio_sendraw, NNG_ECANCELED);
// At this point there should not be any further AIOs running.
// Further, any completion tasks have completed.