diff options
Diffstat (limited to 'src/transport/inproc')
| -rw-r--r-- | src/transport/inproc/inproc.c | 4 |
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); |
