Skip to content

Commit

Permalink
[ISSUE #6660] Fix semaphoreAsyncSendSize init error (#6661)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrirW authored Apr 29, 2023
1 parent 23a8ed4 commit bcbb25f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ public DefaultMQProducerImpl(final DefaultMQProducer defaultMQProducer, RPCHook
log.info("semaphoreAsyncSendNum can not be smaller than 10.");
}

if (defaultMQProducer.getBackPressureForAsyncSendNum() > 1024 * 1024) {
semaphoreAsyncSendSize = new Semaphore(Math.max(defaultMQProducer.getBackPressureForAsyncSendNum(), 1024 * 1024), true);
if (defaultMQProducer.getBackPressureForAsyncSendSize() > 1024 * 1024) {
semaphoreAsyncSendSize = new Semaphore(Math.max(defaultMQProducer.getBackPressureForAsyncSendSize(), 1024 * 1024), true);
} else {
semaphoreAsyncSendSize = new Semaphore(1024 * 1024, true);
log.info("semaphoreAsyncSendSize can not be smaller than 1M.");
Expand Down

0 comments on commit bcbb25f

Please sign in to comment.