Skip to content

Commit

Permalink
Fixed exec result treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
toonvandenbos committed Jun 13, 2024
1 parent c0ef2ef commit b94cc72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public function run($commands, Closure $callback = null, int $timeout = null)
$gateway->setTimeout($timeout);
}

$callback = $this->getCallback($callback);
$result = $gateway->run($this->formatCommands($commands));

$gateway->run($this->formatCommands($commands), $callback);
call_user_func($this->getCallback($callback), $result);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/SecLibGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function connected()
*/
public function run($command)
{
$this->getConnection()->exec($command, null);
return $this->getConnection()->exec($command, null);
}

/**
Expand Down

0 comments on commit b94cc72

Please sign in to comment.