diff --git a/Net/Gearman/Connection.php b/Net/Gearman/Connection.php index 824486c3..fd1a1c5c 100644 --- a/Net/Gearman/Connection.php +++ b/Net/Gearman/Connection.php @@ -261,6 +261,10 @@ 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])) { @@ -268,10 +272,6 @@ public function send($command, array $params = array()) } } - if ($command === 'can_do_timeout') { - $params = $this->fixTimeout($params); - } - $d = implode("\x00", $data); $cmd = "\0REQ" . pack("NN",