ZenWebsocket.Client.RetryPolicy (ZenWebsocket v0.8.0)

Copy Markdown View Source

Pure retry eligibility and error normalization for ZenWebsocket.Client.

Summary

Functions

Unwraps nested Gun/shutdown error tuples to the inner reason.

True when the current error should open a new Gun attempt immediately or later.

Functions

normalize_error(reason)

@spec normalize_error(term()) :: term()

Unwraps nested Gun/shutdown error tuples to the inner reason.

retry_now?(state, reason)

@spec retry_now?(map(), term()) :: boolean()

True when the current error should open a new Gun attempt immediately or later.