From 0a4e91ee47222138ba39d014996e469839d262a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 11 Jan 2022 14:49:51 +0100 Subject: [PATCH] Revert "Always enqueue isc__nm_tcp_resumeread()" The commit itself is harmless, but at the same time it is also useless, so we are reverting it. This reverts commit 11c869a3d53eafa4083b404e6b6686a120919c26. --- lib/isc/netmgr/tcp.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 186bb83cf4..2a600c1430 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -816,7 +816,6 @@ isc__nm_tcp_resumeread(isc_nmhandle_t *handle) { isc__netievent_tcpstartread_t *ievent = NULL; isc_nmsocket_t *sock = handle->sock; - isc__networker_t *worker = &sock->mgr->workers[sock->tid]; REQUIRE(sock->tid == isc_nm_tid()); @@ -838,18 +837,8 @@ isc__nm_tcp_resumeread(isc_nmhandle_t *handle) { ievent = isc__nm_get_netievent_tcpstartread(sock->mgr, sock); - if (worker->recvbuf_inuse) { - /* - * If we happen to call the resumeread from inside the receive - * callback, the worker->recvbuf might still be in use, so we - * need to force enqueue the next read event. - */ - isc__nm_enqueue_ievent(worker, (isc__netievent_t *)ievent); - - } else { - isc__nm_maybe_enqueue_ievent(worker, - (isc__netievent_t *)ievent); - } + isc__nm_maybe_enqueue_ievent(&sock->mgr->workers[sock->tid], + (isc__netievent_t *)ievent); } void