[Client] Implement setMaxRetries connection retries (#413)
* [Client] Implement setMaxRetries connection retries * [Client] Reject a negative retry count in Configuration * [Client] Use a positive init timeout in the retry test * [Client] Drop redundant docblock note on setMaxRetries * [Client] Clear the initialized flag on a failed connection * [Client] Trim comments to the non-obvious ones * [Client] Cover retries and timeout cleanup with integration tests The retry fixture counts the processes it was started as, which is what separates a real retry from a second call into the same server. The timeout fixture outlives the client's patience and then goes idle, so the next request runs on a connection the client already gave up on once.
This commit is contained in:
parent
7b12dc4010
commit
d8cc21a345
1 changed files with 616 additions and 26 deletions
|
|
@ -96,7 +96,11 @@ final class Builder
|
|||
}
|
||||
|
||||
/**
|
||||
* Set maximum retry attempts for failed connections.
|
||||
* Set the number of times a failed connection attempt is retried.
|
||||
*
|
||||
* Counts retries, not attempts: 3 means one initial attempt plus up to three
|
||||
* retries. Pass 0 to fail on the first failure. Only applies to
|
||||
* {@see Client::connect()}; individual requests are never retried.
|
||||
*/
|
||||
public function setMaxRetries(int $retries): self
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue