summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp b/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
index 3d703066b4..7a5d0ab53d 100644
--- a/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
+++ b/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
@@ -102,10 +102,12 @@ bool ConnectionCounter::countConnectionLH(
if (eRef != theMap.end()) {
count = (uint16_t)(*eRef).second + 1;
(*eRef).second = count;
- result = (enforceLimit ? count <= theLimit : true);
} else {
theMap[theName] = count = 1;
}
+ if (enforceLimit) {
+ result = count <= theLimit;
+ }
if (emitLog) {
QPID_LOG(trace, "ACL ConnectionApprover user=" << theName
<< " limit=" << theLimit