Browse Source

reduce retries number and make delays shorter (#299)

Closes #222
remove-strictssl-option
Vsevolod Strukchinsky 8 years ago
committed by GitHub
parent
commit
14d0859261
  1. 2
      index.js
  2. 2
      readme.md

2
index.js

@ -215,7 +215,7 @@ function normalizeArguments(url, opts) {
opts = Object.assign(
{
path: '',
retries: 5
retries: 2
},
url,
{

2
readme.md

@ -132,7 +132,7 @@ Option accepts `object` with separate `connect` and `socket` fields for connecti
###### retries
Type: `number`, `function`<br>
Default: `5`
Default: `2`
Number of request retries when network errors happens. Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0).

Loading…
Cancel
Save