Skip to content

Commit

Permalink
Fix timeout before adding it to the payload
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlmoon committed Feb 24, 2023
1 parent 0f61d29 commit b12b743
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Net/Gearman/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,17 @@ public function send($command, array $params = array())
throw new Net_Gearman_Exception('Invalid command: ' . $command);
}

if ($command === 'can_do_timeout') {
$params = $this->fixTimeout($params);
}

$data = array();
foreach ($this->commands[$command][1] as $field) {
if (isset($params[$field])) {
$data[] = $params[$field];
}
}

if ($command === 'can_do_timeout') {
$params = $this->fixTimeout($params);
}

$d = implode("\x00", $data);

$cmd = "\0REQ" . pack("NN",
Expand Down

0 comments on commit b12b743

Please sign in to comment.