neo4j-driver 4.3.5 → 4.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/neo4j-web.js +34 -8
- package/lib/browser/neo4j-web.min.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
package/lib/browser/neo4j-web.js
CHANGED
|
@@ -5425,6 +5425,9 @@ var ChannelConnection = /** @class */ (function (_super) {
|
|
|
5425
5425
|
};
|
|
5426
5426
|
ChannelConnection.prototype._resetOnFailure = function () {
|
|
5427
5427
|
var _this = this;
|
|
5428
|
+
if (!this.isOpen()) {
|
|
5429
|
+
return;
|
|
5430
|
+
}
|
|
5428
5431
|
this._protocol.reset({
|
|
5429
5432
|
onError: function () {
|
|
5430
5433
|
_this._protocol.resetFailure();
|
|
@@ -7744,9 +7747,29 @@ var Pool = /** @class */ (function () {
|
|
|
7744
7747
|
* @returns {Promise<void>} A promise that is resolved when the resources are purged
|
|
7745
7748
|
*/
|
|
7746
7749
|
Pool.prototype.close = function () {
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7751
|
+
var _this = this;
|
|
7752
|
+
return __generator(this, function (_a) {
|
|
7753
|
+
switch (_a.label) {
|
|
7754
|
+
case 0:
|
|
7755
|
+
this._closed = true;
|
|
7756
|
+
return [4 /*yield*/, Promise.all(Object.keys(this._pools).map(function (key) { return _this._purgeKey(key); }))];
|
|
7757
|
+
case 1:
|
|
7758
|
+
/**
|
|
7759
|
+
* The lack of Promise consuming was making the driver do not close properly in the scenario
|
|
7760
|
+
* captured at result.test.js:it('should handle missing onCompleted'). The test was timing out
|
|
7761
|
+
* because while wainting for the driver close.
|
|
7762
|
+
*
|
|
7763
|
+
* Consuming the Promise.all or by calling then or by awaiting in the result inside this method solved
|
|
7764
|
+
* the issue somehow.
|
|
7765
|
+
*
|
|
7766
|
+
* PS: the return of this method was already awaited at PooledConnectionProvider.close, but the await bellow
|
|
7767
|
+
* seems to be need also.
|
|
7768
|
+
*/
|
|
7769
|
+
return [2 /*return*/, _a.sent()];
|
|
7770
|
+
}
|
|
7771
|
+
});
|
|
7772
|
+
});
|
|
7750
7773
|
};
|
|
7751
7774
|
/**
|
|
7752
7775
|
* Keep the idle resources for the provided addresses and purge the rest.
|
|
@@ -11265,10 +11288,13 @@ var ConnectionHolder = /** @class */ (function () {
|
|
|
11265
11288
|
this._connectionPromise = this._connectionPromise
|
|
11266
11289
|
.then(function (connection) {
|
|
11267
11290
|
if (connection) {
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11291
|
+
if (connection.isOpen()) {
|
|
11292
|
+
return connection
|
|
11293
|
+
.resetAndFlush()
|
|
11294
|
+
.catch(ignoreError)
|
|
11295
|
+
.then(function () { return connection._release(); });
|
|
11296
|
+
}
|
|
11297
|
+
return connection._release();
|
|
11272
11298
|
}
|
|
11273
11299
|
else {
|
|
11274
11300
|
return Promise.resolve();
|
|
@@ -27822,7 +27848,7 @@ exports["default"] = void 0;
|
|
|
27822
27848
|
// This is set up this way to keep the version in the code in
|
|
27823
27849
|
// sync with the npm package version, and to allow the build
|
|
27824
27850
|
// system to control version names at packaging time.
|
|
27825
|
-
var _default = '4.3.
|
|
27851
|
+
var _default = '4.3.6';
|
|
27826
27852
|
exports["default"] = _default;
|
|
27827
27853
|
|
|
27828
27854
|
},{}]},{},[296])(296)
|