aboutsummaryrefslogtreecommitdiff
path: root/src/transport/inproc/inproc.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-15 18:32:32 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-15 18:32:32 -0700
commitbb974dcfa8a22cdf528b6035ab5226f6691f0abf (patch)
tree3dcd2a4f3e6c32a2724ade2eadbe07ca91c11203 /src/transport/inproc/inproc.c
parenta7b16f1d07b680ae8024438e1555d3c43426e4b8 (diff)
downloadnng-bb974dcfa8a22cdf528b6035ab5226f6691f0abf.tar.gz
nng-bb974dcfa8a22cdf528b6035ab5226f6691f0abf.tar.bz2
nng-bb974dcfa8a22cdf528b6035ab5226f6691f0abf.zip
Fix incorrect attempt to proceed inproc.
Diffstat (limited to 'src/transport/inproc/inproc.c')
-rw-r--r--src/transport/inproc/inproc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/inproc/inproc.c b/src/transport/inproc/inproc.c
index 3d13e684..78a0c44a 100644
--- a/src/transport/inproc/inproc.c
+++ b/src/transport/inproc/inproc.c
@@ -470,6 +470,7 @@ nni_inproc_ep_accept(void *arg, nni_aio *aio)
if (ep->mode != NNI_EP_MODE_LISTEN) {
nni_aio_finish(aio, NNG_EINVAL, 0);
+ return;
}
if ((rv = nni_inproc_pipe_init(&pipe, ep)) != 0) {
nni_aio_finish(aio, rv, 0);
@@ -477,7 +478,6 @@ nni_inproc_ep_accept(void *arg, nni_aio *aio)
}
nni_mtx_lock(&nni_inproc.mx);
- aio->a_pipe = pipe;
// We are already on the master list of servers, thanks to bind.
if (ep->closed) {
@@ -491,6 +491,8 @@ nni_inproc_ep_accept(void *arg, nni_aio *aio)
return;
}
+ aio->a_pipe = pipe;
+
// Insert us into the pending server aios, and then run the
// accept list.
nni_aio_list_append(&ep->aios, aio);