neo4j-driver-bolt-connection
Advanced tools
Comparing version 4.3.5 to 4.3.6
@@ -344,2 +344,5 @@ "use strict"; | ||
var _this = this; | ||
if (!this.isOpen()) { | ||
return; | ||
} | ||
this._protocol.reset({ | ||
@@ -346,0 +349,0 @@ onError: function () { |
@@ -155,5 +155,25 @@ "use strict"; | ||
Pool.prototype.close = function () { | ||
var _this = this; | ||
this._closed = true; | ||
return Promise.all(Object.keys(this._pools).map(function (key) { return _this._purgeKey(key); })); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
this._closed = true; | ||
return [4 /*yield*/, Promise.all(Object.keys(this._pools).map(function (key) { return _this._purgeKey(key); }))]; | ||
case 1: | ||
/** | ||
* The lack of Promise consuming was making the driver do not close properly in the scenario | ||
* captured at result.test.js:it('should handle missing onCompleted'). The test was timing out | ||
* because while wainting for the driver close. | ||
* | ||
* Consuming the Promise.all or by calling then or by awaiting in the result inside this method solved | ||
* the issue somehow. | ||
* | ||
* PS: the return of this method was already awaited at PooledConnectionProvider.close, but the await bellow | ||
* seems to be need also. | ||
*/ | ||
return [2 /*return*/, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
@@ -160,0 +180,0 @@ /** |
{ | ||
"name": "neo4j-driver-bolt-connection", | ||
"version": "4.3.5", | ||
"version": "4.3.6", | ||
"description": "Implements the connection with the Neo4j Database using the Bolt Protocol", | ||
@@ -38,5 +38,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"neo4j-driver-core": "^4.3.5", | ||
"neo4j-driver-core": "^4.3.6", | ||
"text-encoding-utf-8": "^1.0.2" | ||
} | ||
} |
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
402369
9131
Updatedneo4j-driver-core@^4.3.6