Instance Method


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


func retry(_ retries: Int) -> Publishers.Retry<Publishers.Share<Upstream>>



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.


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