summaryrefslogtreecommitdiff
path: root/src/protocol/reqrep0/rep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/reqrep0/rep.c')
-rw-r--r--src/protocol/reqrep0/rep.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/protocol/reqrep0/rep.c b/src/protocol/reqrep0/rep.c
index 965cbea7..c483b777 100644
--- a/src/protocol/reqrep0/rep.c
+++ b/src/protocol/reqrep0/rep.c
@@ -297,6 +297,15 @@ rep0_sock_close(void *arg)
}
static void
+rep0_pipe_stop(void *arg)
+{
+ rep0_pipe *p = arg;
+
+ nni_aio_stop(p->aio_send);
+ nni_aio_stop(p->aio_recv);
+}
+
+static void
rep0_pipe_fini(void *arg)
{
rep0_pipe *p = arg;
@@ -347,14 +356,14 @@ rep0_pipe_start(void *arg)
}
static void
-rep0_pipe_stop(void *arg)
+rep0_pipe_close(void *arg)
{
rep0_pipe *p = arg;
rep0_sock *s = p->rep;
rep0_ctx * ctx;
- nni_aio_stop(p->aio_send);
- nni_aio_stop(p->aio_recv);
+ nni_aio_close(p->aio_send);
+ nni_aio_close(p->aio_recv);
nni_mtx_lock(&s->lk);
if (nni_list_active(&s->recvpipes, p)) {
@@ -647,6 +656,7 @@ static nni_proto_pipe_ops rep0_pipe_ops = {
.pipe_init = rep0_pipe_init,
.pipe_fini = rep0_pipe_fini,
.pipe_start = rep0_pipe_start,
+ .pipe_close = rep0_pipe_close,
.pipe_stop = rep0_pipe_stop,
};