Instance Method

retry(_:)

Attempts to recreate a failed subscription with the upstream publisher using a specified number of attempts to establish the connection.

Declaration

func retry(_ retries: Int) -> Publishers.Retry<Publishers.Concatenate<Prefix, Suffix>>

Parameters

retries

The number of times to attempt to recreate the subscription.

Return Value

A publisher that attempts to recreate its subscription to a failed upstream publisher.

Discussion

After exceeding the specified number of retries, the publisher passes the failure to the downstream receiver.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software