Queue: fix unlock mutex on close()

On o.l.ackedqueue.Queue.close() method the
lock.unlock() call might not execute, leaving
a mutex locked.

This change ensure that lock.unlock() is always
execute by moving its call to the sibling
try/catch's finally block.
This commit is contained in:
Wainer dos Santos Moschetta 2017-04-13 19:54:26 +00:00 committed by Colin Surprenant
parent 42166f3d52
commit 009a8bd571

View file

@ -668,8 +668,9 @@ public class Queue implements Closeable {
} catch (IOException e) {
// log error and ignore
logger.error("Queue close releaseLock failed, error={}", e.getMessage());
} finally {
lock.unlock();
}
lock.unlock();
}
}
}