aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/pipeline
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-03-06 11:21:32 -0800
committerGarrett D'Amore <garrett@damore.org>2017-03-06 11:21:32 -0800
commit68586f0090419def344debf970402750332af098 (patch)
treebff6f606ed2f5bdf448b904725a0baaf805fbc57 /src/protocol/pipeline
parent44a6de38d240143ec2b4bb6f6457bae81271820a (diff)
downloadnng-68586f0090419def344debf970402750332af098.tar.gz
nng-68586f0090419def344debf970402750332af098.tar.bz2
nng-68586f0090419def344debf970402750332af098.zip
Pub/Sub now callback driven.
Diffstat (limited to 'src/protocol/pipeline')
-rw-r--r--src/protocol/pipeline/push.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocol/pipeline/push.c b/src/protocol/pipeline/push.c
index fcbb6d4f..16156ee4 100644
--- a/src/protocol/pipeline/push.c
+++ b/src/protocol/pipeline/push.c
@@ -208,6 +208,8 @@ nni_push_recv_cb(void *arg)
nni_pipe_close(pp->pipe);
return;
}
+ nni_msg_free(pp->aio_recv.a_msg);
+ pp->aio_recv.a_msg = NULL;
nni_push_recv(pp);
}
@@ -220,6 +222,8 @@ nni_push_send_cb(void *arg)
nni_mtx *mx = nni_sock_mtx(push->sock);
if (nni_aio_result(&pp->aio_send) != 0) {
+ nni_msg_free(pp->aio_send.a_msg);
+ pp->aio_send.a_msg = NULL;
nni_pipe_close(pp->pipe);
return;
}