}
}
- 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);