Skip to content
This repository was archived by the owner on May 11, 2018. It is now read-only.

Commit 4715a46

Browse files
authored
Fixes #370
* Fixes #370
1 parent 7d50f4e commit 4715a46

File tree

1 file changed

+6
-0
lines changed
  • mq/main/mq-broker/broker-core/src/main/java/com/sun/messaging/jmq/jmsserver/service/imq

1 file changed

+6
-0
lines changed

mq/main/mq-broker/broker-core/src/main/java/com/sun/messaging/jmq/jmsserver/service/imq/JMSServiceImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2638,6 +2638,8 @@ public Packet getNextConsumerPacket(ConsumerUID cuid, long timeout)
26382638

26392639
// add an event listener to wake us up when the consumer is busy
26402640
Object lock = c.addEventListener(this,EventType.BUSY_STATE_CHANGED, null);
2641+
try {
2642+
26412643
while (!c.isBusy() || stopped) {
26422644
try {
26432645
// wait until the consumer is not busy
@@ -2697,6 +2699,10 @@ public Packet getNextConsumerPacket(ConsumerUID cuid, long timeout)
26972699
}
26982700
} catch (Exception ex) {}
26992701
// remove the event listener since we arent sure if we will care
2702+
//c.removeEventListener(lock);
2703+
} //while
2704+
2705+
} finally {
27002706
c.removeEventListener(lock);
27012707
}
27022708
//if (stopped) return null;

0 commit comments

Comments
 (0)