From 81808ce3d38cc7ce0131367e2187f0beb2cd1b43 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 15 May 2018 11:59:09 -0700 Subject: fixes #431 hang in taskq_wait fixes #429 async websocket reap leads to crash This tightens up the code for shutdown, ensuring that transport callbacks are completely stopped before advancing to the next step of teardown of transport pipes or endpoints. It also fixes a problem where task_wait would sometimes get "stuck" as tasks transitioned between asynch and synchronous completions. Finally, it saves a few cycles by only calling a cancellation callback once during cancellation of an aio. --- src/core/pipe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/pipe.c') diff --git a/src/core/pipe.c b/src/core/pipe.c index ba3027cf..321e1a09 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -110,6 +110,9 @@ nni_pipe_destroy(nni_pipe *p) if (p->p_proto_data != NULL) { p->p_proto_ops.pipe_stop(p->p_proto_data); } + if ((p->p_tran_data != NULL) && (p->p_tran_ops.p_stop != NULL)) { + p->p_tran_ops.p_stop(p->p_tran_data); + } // We have exclusive access at this point, so we can check if // we are still on any lists. -- cgit v1.2.3-70-g09d2