aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/supplemental/http/http.c')
-rw-r--r--src/supplemental/http/http.c7
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);
}