retryDelegate

Retries a passed delegate until it no longer throws or until the hardcoded number of retries (TwitchPlugin.delegateRetries) is reached, or forever if endlessly is passed.

version(TwitchSupport && WithTwitchPlugin)
package
retryDelegate
(
Dg
)
(,
Dg dg
,
const bool async = true
,
const bool endlessly = false
,
const Duration retryDelay = 4.seconds
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

dg Dg

Delegate to call.

async bool

Whether or not the delegate should be called asynchronously, scheduling attempts using delay.

endlessly bool

Whether or not to endlessly retry.

retryDelay Duration

How long to wait between retries.

Return Value

Type: auto

Whatever the passed delegate returns.