neo4j-driver-bolt-connection
Advanced tools
Comparing version 4.4.0-beta02 to 4.4.0
@@ -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.4.0-beta02", | ||
"version": "4.4.0", | ||
"description": "Implements the connection with the Neo4j Database using the Bolt Protocol", | ||
@@ -41,6 +41,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"neo4j-driver-core": "^4.4.0-beta02", | ||
"neo4j-driver-core": "^4.4.0", | ||
"text-encoding-utf-8": "^1.0.2" | ||
}, | ||
"gitHead": "cf2272c39d5038f42391a09646ac8241f00b81e5" | ||
"gitHead": "473235e64579ecd32e46510de9a8d9b8b83c63e6" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
430517
9406
0
Updatedneo4j-driver-core@^4.4.0