goto fail;
}
+ if (!sock->client && sock->reading) {
+ sock->reading_throttled = true;
+ isc__nm_stop_reading(sock);
+ }
+
isc_log_write(isc_lctx, 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);
+ "%sthe other side is not "
+ "reading the data, switching to uv_write()",
+ !sock->client && sock->reading
+ ? "throttling TCP connection, "
+ : "");
r = uv_write(&uvreq->uv_req.write, &sock->uv_handle.stream, bufs, nbufs,
tcpdns_send_cb);
break;
}
- isc_log_write(
- isc_lctx, 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_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_NETMGR, 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,
&req->uvbuf, 1, tls_write_cb);