From 1e945e873d3bd791354dec504e42025502c6042f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 1 Jan 2018 22:12:07 -0800 Subject: Fix HTTP sconn race, and compile bugs introduced. --- src/supplemental/http/http.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/supplemental/http') diff --git a/src/supplemental/http/http.c b/src/supplemental/http/http.c index df5c7588..723b3e55 100644 --- a/src/supplemental/http/http.c +++ b/src/supplemental/http/http.c @@ -429,11 +429,12 @@ http_wr_cancel(nni_aio *aio, int rv) nni_mtx_lock(&http->mtx); if (nni_aio_list_active(aio)) { - nni_aio_list_remove(aio); if (aio == nni_list_first(&http->wrq)) { - http_close(http); + nni_aio_cancel(http->wr_aio, NNG_ECANCELED); + } else { + nni_aio_list_remove(aio); + nni_aio_finish_error(aio, rv); } - nni_aio_finish_error(aio, rv); } nni_mtx_unlock(&http->mtx); } -- cgit v1.2.3-70-g09d2