stianeikeland / node-etcd

:satellite: Etcd client for nodejs
BSD 3-Clause "New" or "Revised" License
259 stars 85 forks source link

Exp Backoff Retry for HTTP Connection Timeout #82

Open nazeemkhan77 opened 6 years ago

nazeemkhan77 commented 6 years ago

Hi, I looking into the module to see if it supports exp retry for the connection timeout scenario. Currently, the retry logic works only if the Http connection is refused or reset or HTTP status code 300 or 301. I would like to know if there is any reason for not supporting the http connection timeout.

Note: Retry node module supports exp backoff retry and it retries for these http errors {'ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'}.

Thanks, Nazimuddin