https://issues.apache.org/jira/browse/AMQ-3481 - check for tryLock success before unlock

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1186539 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-10-19 22:26:07 +00:00
parent 1fd39c991e
commit 1250163f39
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ public abstract class AbstractInactivityMonitor extends TransportFilter {
} catch (IOException e) { } catch (IOException e) {
onException(e); onException(e);
} finally { } finally {
sendLock.writeLock().unlock(); if (sendLock.writeLock().isHeldByCurrentThread()) {
sendLock.writeLock().unlock();
}
} }
} }
}; };