Skip to content

Commit

Permalink
[ISSUE apache#4778] Fix Standalone MessageQueue does not down counter…
Browse files Browse the repository at this point in the history
… when dequeue (apache#4779)

* bug fix

* bug fix
  • Loading branch information
karsonto authored Feb 21, 2024
1 parent 1a5e06c commit c93fc3e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,11 @@ private void enqueue(MessageEntity messageEntity) {
* @return The MessageEntity object at the head of the queue.
*/
private MessageEntity dequeue() {
MessageEntity item = items[takeIndex++];
final MessageEntity item = items[takeIndex++];
if (takeIndex == items.length) {
takeIndex = 0;
}
count--;
notFull.signalAll();
return item;
}
Expand Down

0 comments on commit c93fc3e

Please sign in to comment.