Skip to content

Commit 8be85c8

Browse files
committed
change retries to attempts for clarity, set to 2 instead of 1 so that it actually retries
1 parent 19f5c44 commit 8be85c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Services/FileMakerConnection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class FileMakerConnection extends Connection
3232

3333
protected ?string $sessionToken = null;
3434

35-
protected int $retries = 1;
35+
protected int $attempts = 2;
3636

3737
protected bool $shouldCacheSessionToken = true;
3838

@@ -115,7 +115,7 @@ protected function fetchNewSessionToken()
115115
];
116116

117117
// perform the login
118-
$response = Http::retry($this->retries, 100)->withBasicAuth($this->config['username'], $this->config['password'])
118+
$response = Http::retry($this->attempts, 100)->withBasicAuth($this->config['username'], $this->config['password'])
119119
->post($url, $postBody);
120120

121121
// Check for errors
@@ -690,7 +690,7 @@ protected function prepareRequestForSending($request = null)
690690
$request = new PendingRequest();
691691
}
692692

693-
$request->retry($this->retries, 100)->withToken($this->sessionToken);
693+
$request->retry($this->attempts, 100)->withToken($this->sessionToken);
694694

695695
return $request;
696696
}
@@ -791,7 +791,7 @@ protected function getSqlCommandType($method, $url)
791791

792792
public function setRetries($retries)
793793
{
794-
$this->retries = $retries;
794+
$this->attempts = $retries + 1;
795795

796796
return $this;
797797
}

0 commit comments

Comments
 (0)