cluster-client
Advanced tools
Comparing version 1.5.3 to 1.5.4
1.5.4 / 2017-04-12 | ||
================== | ||
* fix: avoid event memory leak warning (#20) | ||
1.5.3 / 2017-03-17 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -110,6 +110,10 @@ 'use strict'; | ||
}); | ||
conn.once('close', () => { | ||
this._connections.delete(conn.key); | ||
for (const connKeySet of this._subConnMap.values()) { | ||
connKeySet.delete(conn.key); | ||
} | ||
}); | ||
this._connections.set(conn.key, conn); | ||
this.on('close', () => conn.emit('close')); | ||
this._doSubscribe(reg, conn); | ||
@@ -124,3 +128,6 @@ } | ||
const conn = this._connections.get(connKey); | ||
if (conn && listener ? conn.listener === listener : conn.isMock) { | ||
if (!conn) { | ||
continue; | ||
} | ||
if (conn.isMock && (!listener || conn.listener === listener)) { | ||
this._connections.delete(connKey); | ||
@@ -369,4 +376,6 @@ continue; | ||
// 2. close all mock connections | ||
for (const [ key, conn ] of this._connections.entries()) { | ||
if (conn.isMock) this._connections.delete(key); | ||
for (const conn of this._connections.values()) { | ||
if (conn.isMock) { | ||
conn.emit('close'); | ||
} | ||
} | ||
@@ -373,0 +382,0 @@ |
{ | ||
"name": "cluster-client", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "Sharing Connection among Multi-Process Nodejs", | ||
@@ -35,7 +35,7 @@ "main": "./index.js", | ||
"co": "^4.6.0", | ||
"debug": "^2.6.2", | ||
"debug": "^2.6.3", | ||
"is-type-of": "^1.0.0", | ||
"json-stringify-safe": "^5.0.1", | ||
"long": "^3.2.0", | ||
"sdk-base": "^3.1.0", | ||
"sdk-base": "^3.1.1", | ||
"serialize-json": "^1.0.1", | ||
@@ -52,5 +52,5 @@ "tcp-base": "^2.0.0", | ||
"egg": "^0.5.0", | ||
"egg-bin": "^2.4.0", | ||
"egg-ci": "^1.5.0", | ||
"egg-mock": "^3.1.2", | ||
"egg-bin": "^3.2.1", | ||
"egg-ci": "^1.6.0", | ||
"egg-mock": "^3.2.0", | ||
"eslint": "^3.12.0", | ||
@@ -57,0 +57,0 @@ "eslint-config-egg": "^3.2.0", |
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
65514
1698
Updateddebug@^2.6.3
Updatedsdk-base@^3.1.1