Skip to content

Commit 1fcc31a

Browse files
authored
Merge pull request #42 from oneflow/fix/retry-options
Fix: check if retry options are set
2 parents a9ecfc2 + 3b2a5f4 commit 1fcc31a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OneflowSDK.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function __construct($url, $key, $secret, $options = null){
5656
$this->apiName = "connect";
5757
$this->version = "0.1";
5858
$this->authHeader = "x-oneflow-authorization";
59-
$this->retries = $options->retries ?: 3;
60-
$this->retryCondition = $options->retryCondition ?: "OneflowSDK::isRetryableError";
61-
$this->retryDelay = $options->retryDelay ?: "OneflowSDK::exponentialDelay";
59+
$this->retries = isset($options->retries) ? $options->retries : 3;
60+
$this->retryCondition = isset($options->retryCondition) ? $options->retryCondition : "OneflowSDK::isRetryableError";
61+
$this->retryDelay = isset($options->retryDelay) ? $options->retryDelay : "OneflowSDK::exponentialDelay";
6262
}
6363

6464
//ACCOUNTS

0 commit comments

Comments
 (0)