diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-01-01 22:12:07 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-01-01 22:12:07 -0800 |
| commit | 1e945e873d3bd791354dec504e42025502c6042f (patch) | |
| tree | 8c7aafedabd36bb0ecb65da68acf8818aba78aa1 /src/supplemental/http | |
| parent | 7e83c78ad2c98a7c32a1b9557deaa13723e75b02 (diff) | |
| download | nng-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.c | 7 |
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); } |
