diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 1e21c6fe73..ca3ed8b7f4 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -1208,12 +1208,17 @@ tcp_send_direct(isc_nmsocket_t *sock, isc__nm_uvreq_t *req) { } } - isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR, - ISC_LOG_DEBUG(3), - "throttling TCP connection, the other side is not " - "reading the data, switching to uv_write()"); - sock->reading_throttled = true; - isc__nm_stop_reading(sock); + if (!sock->client && sock->reading) { + sock->reading_throttled = true; + isc__nm_stop_reading(sock); + } + + isc__nmsocket_log(sock, ISC_LOG_DEBUG(3), + "%sthe other side is not " + "reading the data, switching to uv_write()", + !sock->client && sock->reading + ? "throttling TCP connection, " + : ""); r = uv_write(&req->uv_req.write, &sock->uv_handle.stream, bufs, nbufs, tcp_send_cb);