aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-01-01 22:12:07 -0800
committerGarrett D'Amore <garrett@damore.org>2018-01-01 22:12:07 -0800
commit1e945e873d3bd791354dec504e42025502c6042f (patch)
tree8c7aafedabd36bb0ecb65da68acf8818aba78aa1 /src/supplemental/http
parent7e83c78ad2c98a7c32a1b9557deaa13723e75b02 (diff)
downloadnng-1e945e873d3bd791354dec504e42025502c6042f.tar.gz
nng-1e945e873d3bd791354dec504e42025502c6042f.tar.bz2
nng-1e945e873d3bd791354dec504e42025502c6042f.zip
Fix HTTP sconn race, and compile bugs introduced.
Diffstat (limited to 'src/supplemental/http')
-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 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);
}