https://issues.apache.org/jira/browse/AMQ-3316 - Memory leak in ConnectionStateTracker with MessagePull objects. Patch applied with thanks, good catch\!

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1102018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-05-11 18:51:54 +00:00
parent 717bca1a40
commit a1c19c5e49
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ public class ConnectionStateTracker extends CommandVisitorAdapter {
if (result) {
if (eldest.getValue() instanceof Message) {
currentCacheSize -= ((Message)eldest.getValue()).getSize();
} else if (eldest.getValue() instance of MessagePull) {
currentCacheSize -= 400;
}
}
return result;