diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-12-28 16:02:53 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-12-28 16:02:53 -0800 |
| commit | aa3bb50aeca3b7350a41f0538817c49d9656d207 (patch) | |
| tree | 4abafbdc7553e52776394e067fa1ff9a08a14a57 /src/supplemental/http/http.c | |
| parent | 838d92deabffbaae1b1a9e447d2088f966078726 (diff) | |
| download | nng-aa3bb50aeca3b7350a41f0538817c49d9656d207.tar.gz nng-aa3bb50aeca3b7350a41f0538817c49d9656d207.tar.bz2 nng-aa3bb50aeca3b7350a41f0538817c49d9656d207.zip | |
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.
Diffstat (limited to 'src/supplemental/http/http.c')
| -rw-r--r-- | src/supplemental/http/http.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |
