Home › Overview › MainModule › Util
Retry
Retries a function with exponential backoff until it succeeds or exceeds the maximum number of attempts.
Functions
Retry Yields
luau
Retry(callback: (...any) -> any | nil, attempts: number?, base: number?, ...: any?): (boolean, any)Parameters
callback: The function to retryattempts: Number of retry attempts (Default: 5)base: Backoff delay exponent base, adds a delay ofbase ^ attemptsbetween attempts (Default: 2)...: Additional arguments to pass to the callback function
Returns
boolean: Whether the pcall succeeded, followed by its results