Added synchronize block

This commit is contained in:
Emmanuel Bigeon 2018-10-11 11:32:23 -04:00
parent 6bcf2b0c91
commit 7ba8b38624

View File

@ -200,7 +200,9 @@ public final class ReadingRunnable implements Runnable {
*/
private void doWaitMessage(final long timeout) throws IOException {
try {
synchronized (lock) {
lock.wait(timeout);
}
} catch (final InterruptedException e) {
LOGGER.log(Level.SEVERE, THREAD_INTERRUPTION_EXCEPTION, e);
Thread.currentThread().interrupt();