Retry is now a coroutine
Retry is now a coroutine

It iterates over the attempts with a loop and returns a value if the function being called ever succeeds without error. If there is an error, it will wait retryDelayMS before trying again. If there is an error AND it has err.data.retry_after_ms (as with matrix-js-sdk rate-limiting), it will wait for the sum of retryDelayMS and err.data.retry_after_ms before retrying. When the number of attempts are reached, an error will be thrown.

matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc