Skip to content

Commit

Permalink
Merge pull request #1168 from katoken-0215/wrong-example-retry-strategy
Browse files Browse the repository at this point in the history
Check options.error
  • Loading branch information
BridgeAR authored Nov 25, 2016
2 parents ee6aba4 + dd3179a commit 4b27f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ retry_strategy example
```js
var client = redis.createClient({
retry_strategy: function (options) {
if (options.error.code === 'ECONNREFUSED') {
if (options.error && options.error.code === 'ECONNREFUSED') {
// End reconnecting on a specific error and flush all commands with a individual error
return new Error('The server refused the connection');
}
Expand Down

0 comments on commit 4b27f79

Please sign in to comment.