From aa3bb50aeca3b7350a41f0538817c49d9656d207 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 28 Dec 2017 16:02:53 -0800 Subject: Fix compilation warnings, bugs, and crashes found on Windows. This addresses a number of problems that were found on Windows, including one bug that actually turned up in testing on POSIX. --- src/supplemental/http/http.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/supplemental/http/http.c') diff --git a/src/supplemental/http/http.c b/src/supplemental/http/http.c index 08a8eb13..f414c5c7 100644 --- a/src/supplemental/http/http.c +++ b/src/supplemental/http/http.c @@ -299,11 +299,12 @@ http_rd_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->rdq)) { - http_close(http); + nni_aio_cancel(http->rd_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