mirror of https://github.com/apache/activemq.git
fix for AMQ-627 to always catch and deal with interupted exceptions
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386586 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
15550b812a
commit
cfbb3c852a
|
@ -229,10 +229,12 @@ public class ActiveMQQueueBrowser implements
|
||||||
*/
|
*/
|
||||||
protected void waitForMessage() {
|
protected void waitForMessage() {
|
||||||
try {
|
try {
|
||||||
synchronized (semaphore ) {
|
synchronized (semaphore) {
|
||||||
semaphore.wait(2000);
|
semaphore.wait(2000);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
}
|
||||||
|
catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class ResponseHolder {
|
||||||
lock.wait(timeout);
|
lock.wait(timeout);
|
||||||
}
|
}
|
||||||
catch (InterruptedException e) {
|
catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue