Comparing version 7.1.0 to 7.2.0
@@ -65,3 +65,4 @@ 'use strict'; | ||
onDisconnect: Joi.func().default(Hoek.ignore), | ||
reconnect: Joi.boolean().default(true) | ||
reconnect: Joi.boolean().default(true), | ||
reconnectTimeout: Joi.number().integer().min(1).allow(false).default(100) | ||
}), | ||
@@ -176,2 +177,3 @@ table: Joi.object({ | ||
if (this._willReconnect()) { | ||
let first = true; | ||
const loop = (err) => { | ||
@@ -183,7 +185,8 @@ | ||
setImmediate(() => { // Prevents stack overflow if connect() fails on same tick | ||
first = false; | ||
setTimeout(() => { // Prevents stack overflow if connect() fails on same tick | ||
this._settings.onError(err); | ||
this.connect(loop); | ||
}); | ||
}, this._settings.reconnectTimeout && !first ? this._settings.reconnectTimeout : 0); | ||
}; | ||
@@ -190,0 +193,0 @@ |
{ | ||
"name": "penseur", | ||
"description": "Lightweight RethinkDB wrapper", | ||
"version": "7.1.0", | ||
"version": "7.2.0", | ||
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/hueniverse/penseur", |
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
55397
1428