diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-16 14:08:37 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-16 14:08:37 -0700 |
| commit | 800c9b609ded23caa5050121deb5c97ccbaedf63 (patch) | |
| tree | 8c06b4ac3fb9693a0e3015bb70d484897978f76f /src/core/pipe.c | |
| parent | fd091ae4c299e11603adb04b674240156d63da71 (diff) | |
| download | nng-800c9b609ded23caa5050121deb5c97ccbaedf63.tar.gz nng-800c9b609ded23caa5050121deb5c97ccbaedf63.tar.bz2 nng-800c9b609ded23caa5050121deb5c97ccbaedf63.zip | |
Close negotiation race.
Diffstat (limited to 'src/core/pipe.c')
| -rw-r--r-- | src/core/pipe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/pipe.c b/src/core/pipe.c index c98a3243..7b285575 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -53,7 +53,6 @@ nni_pipe_destroy(nni_pipe *p) return; } - nni_aio_fini(&p->p_start_aio); if (p->p_proto_data != NULL) { p->p_proto_dtor(p->p_proto_data); } @@ -108,6 +107,9 @@ nni_pipe_close(nni_pipe *p) } nni_mtx_unlock(&p->p_mtx); + + // Ensure that the negotiation step is aborted fully. + nni_aio_fini(&p->p_start_aio); } // Pipe reap is called on a taskq when the pipe should be closed. No |
