Added synchronize block
This commit is contained in:
parent
6bcf2b0c91
commit
7ba8b38624
@ -200,7 +200,9 @@ public final class ReadingRunnable implements Runnable {
|
|||||||
*/
|
*/
|
||||||
private void doWaitMessage(final long timeout) throws IOException {
|
private void doWaitMessage(final long timeout) throws IOException {
|
||||||
try {
|
try {
|
||||||
lock.wait(timeout);
|
synchronized (lock) {
|
||||||
|
lock.wait(timeout);
|
||||||
|
}
|
||||||
} catch (final InterruptedException e) {
|
} catch (final InterruptedException e) {
|
||||||
LOGGER.log(Level.SEVERE, THREAD_INTERRUPTION_EXCEPTION, e);
|
LOGGER.log(Level.SEVERE, THREAD_INTERRUPTION_EXCEPTION, e);
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
|
Loading…
Reference in New Issue
Block a user