Skip to content

Commit

Permalink
[cleanup] [broker] when serverCnx.disabledAutoRead(), use same code (a…
Browse files Browse the repository at this point in the history
…pache#15181)

Co-authored-by: fengyubiao <[email protected]>
  • Loading branch information
poorbarcode and fengyubiao authored Jun 21, 2022
1 parent 603a5cd commit 5d563ac
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2647,8 +2647,7 @@ public void startSendOperation(Producer producer, int msgSize, int numMessages)
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();
}
Expand Down

0 comments on commit 5d563ac

Please sign in to comment.