Skip to content

Commit

Permalink
Merge pull request #42 from oneflow/fix/retry-options
Browse files Browse the repository at this point in the history
Fix: check if retry options are set
  • Loading branch information
juanjoseruiz authored Aug 3, 2022
2 parents a9ecfc2 + 3b2a5f4 commit 1fcc31a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OneflowSDK.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public function __construct($url, $key, $secret, $options = null){
$this->apiName = "connect";
$this->version = "0.1";
$this->authHeader = "x-oneflow-authorization";
$this->retries = $options->retries ?: 3;
$this->retryCondition = $options->retryCondition ?: "OneflowSDK::isRetryableError";
$this->retryDelay = $options->retryDelay ?: "OneflowSDK::exponentialDelay";
$this->retries = isset($options->retries) ? $options->retries : 3;
$this->retryCondition = isset($options->retryCondition) ? $options->retryCondition : "OneflowSDK::isRetryableError";
$this->retryDelay = isset($options->retryDelay) ? $options->retryDelay : "OneflowSDK::exponentialDelay";
}

//ACCOUNTS
Expand Down

0 comments on commit 1fcc31a

Please sign in to comment.