From 35e77bdd02a735da8e7cde7a3be8b9a1fbbf084a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 26 Dec 2024 14:36:24 -0800 Subject: [PATCH] http: No need to do nni_aio_begin for callbacks --- src/supplemental/http/http_server.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c index e068ae987..74dd76a35 100644 --- a/src/supplemental/http/http_server.c +++ b/src/supplemental/http/http_server.c @@ -702,11 +702,7 @@ http_sconn_rxdone(void *arg) // asynchronously even after it gets removed from the server. nni_atomic_inc(&h->ref); - // Documented that we call this on behalf of the callback. - if (nni_aio_begin(&sc->cbaio) != 0) { - nni_mtx_unlock(&s->mtx); - return; - } + nni_aio_reset(&sc->cbaio); nni_mtx_unlock(&s->mtx); h->cb(&sc->cbaio);