tim-kos / node-retry

Abstraction for exponential and custom retry strategies for failed operations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should set _operationTimeout timeout *before* invoking _fn()

cybersam opened this issue · comments

commented

attempt() and retry() both set the _operationTimeout timeout after invoking _fn(). Therefore, the time it takes _fn() to perform any synchronous processing (which could be significant) is ignored.

The timeout should be set immediately before invoking _fn().