From bb974dcfa8a22cdf528b6035ab5226f6691f0abf Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 15 Jul 2017 18:32:32 -0700 Subject: Fix incorrect attempt to proceed inproc. --- src/transport/inproc/inproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/transport') 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); -- cgit v1.2.3-70-g09d2