[cleanup] [broker] when serverCnx.disabledAutoRead(), use same code
@@ -2647,8 +2647,7 @@ public class ServerCnx extends PulsarHandler implements TransportCnx {
if (++pendingSendRequest == maxPendingSendRequests || isPublishRateExceeded) {
// When the quota of pending send requests is reached, stop reading from socket to cause backpressure on
// client connection, possibly shared between multiple producers
- ctx.channel().config().setAutoRead(false);
- recordRateLimitMetrics(producers);
+ disableCnxAutoRead();
autoReadDisabledRateLimiting = isPublishRateExceeded;
throttledConnections.inc();
}
