Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
retry module wants retries, not count
Browse files Browse the repository at this point in the history
  • Loading branch information
othiym23 committed Nov 22, 2014
1 parent 7e6ac0e commit 216f96a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -29,7 +29,7 @@ function RegClient (config) {
if (this.config.ssl.strict === undefined) this.config.ssl.strict = true

this.config.retry = this.config.retry || {}
if (!this.config.retry.count) this.config.retry.count = 2
if (typeof this.config.retry.retries !== "number") this.config.retry.retries = 2
if (!this.config.retry.factor) this.config.retry.factor = 10
if (!this.config.retry.minTimeout) this.config.retry.minTimeout = 10000
if (!this.config.retry.maxTimeout) this.config.retry.maxTimeout = 60000
Expand Down
2 changes: 1 addition & 1 deletion test/config-defaults.js
Expand Up @@ -18,7 +18,7 @@ test("config defaults", function (t) {
t.equal(ssl.strict, true, "SSL is strict by default")

var retry = client.config.retry
t.equal(retry.count, 2, "default retry count is 2")
t.equal(retry.retries, 2, "default retry count is 2")
t.equal(retry.factor, 10, "default retry factor is 10")
t.equal(retry.minTimeout, 10000, "retry minimum timeout is 10000 (10 seconds)")
t.equal(retry.maxTimeout, 60000, "retry maximum timeout is 60000 (60 seconds)")
Expand Down
2 changes: 1 addition & 1 deletion test/retries.js
Expand Up @@ -4,7 +4,7 @@ var server = require("./lib/server.js")
var common = require("./lib/common.js")
var client = common.freshClient({
retry : {
count : 6,
retries : 6,
minTimeout : 10,
maxTimeout : 100
}
Expand Down

0 comments on commit 216f96a

Please sign in to comment.