Comparing version 1.6.0 to 1.7.0
@@ -26,8 +26,11 @@ /*jslint node: true */ | ||
{ | ||
if (!existing.clientMap.has(val.clientId)) | ||
var clientMap = existing.clientMap, | ||
size = existing.clientMap.size; | ||
clientMap.set(val.clientId, val.qos); | ||
if (clientMap.size > size) | ||
{ | ||
this.sub_count += 1; | ||
} | ||
existing.clientMap.set(val.clientId, val.qos); | ||
}; | ||
@@ -65,3 +68,10 @@ | ||
{ | ||
if (existing.clientMap.has(val.clientId)) | ||
var clientMap = existing.clientMap, | ||
size_before = clientMap.size; | ||
clientMap.delete(val.clientId); | ||
var size_after = clientMap.size; | ||
if (size_after < size_before) | ||
{ | ||
@@ -71,5 +81,3 @@ this.sub_count -= 1; | ||
existing.clientMap.delete(val.clientId); | ||
return existing.clientMap.size === 0; | ||
return size_after === 0; | ||
}; | ||
@@ -76,0 +84,0 @@ |
{ | ||
"name": "qlobber", | ||
"description": "Node.js globbing for amqp-like topics", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"homepage": "https://github.com/davedoesdev/qlobber", | ||
@@ -6,0 +6,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240698
2995