Skip to content

Commit

Permalink
remove code only needed for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlmoon committed Feb 3, 2017
1 parent e3340ed commit b5ed52d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Net/Gearman/Worker.php
Expand Up @@ -250,23 +250,18 @@ private function connect($server) {

$this->conn[$server] = new Net_Gearman_Connection($server);

list($host, $port) = explode(":", $server);

$this->conn[$server]->send("set_client_id", array("client_id" => $this->id));

$this->addAbilities($this->conn[$server]);

if (isset($this->retryConn[$server])) {
unset($this->retryConn[$server]);
list($host, $port) = explode(":", $server);
}

$success = true;

} catch (Net_Gearman_Exception $e) {

list($host, $port) = explode(":", $server);

$this->sleepConnection($server);

}
Expand Down Expand Up @@ -295,8 +290,6 @@ private function sleepConnection($server) {
$this->failedConn[$server]++;
}

list($host, $port) = explode(":", $server);

}

/**
Expand Down Expand Up @@ -428,8 +421,6 @@ public function beginWork($monitor = null)

} catch (Net_Gearman_Exception $e) {

list($host, $port) = explode(":", $server);

$this->sleepConnection($server);
}

Expand Down Expand Up @@ -457,7 +448,6 @@ public function beginWork($monitor = null)
try {
$conn->send('pre_sleep');
} catch (Net_Gearman_Exception $e) {
list($host, $port) = explode(":", $server);
$this->sleepConnection($server);
}
}
Expand Down Expand Up @@ -486,7 +476,6 @@ public function beginWork($monitor = null)
$errno = socket_last_error($conn->socket);
if ($errno > 0){ // 0 means timeout which is normal
$this->sleepConnection($server);
list($host, $port) = explode(":", $server);
}
}
}
Expand Down Expand Up @@ -551,7 +540,6 @@ protected function retryConnections() {
}

if (($lastTry + $retryTime) < $now) {
list($host, $port) = explode(":", $s);
/**
* If we reconnect to a server, don't sleep
*/
Expand Down Expand Up @@ -598,7 +586,6 @@ protected function doWork($conn)
break;
}
}
list($host, $port) = explode(":", $server);
return false;
}

Expand Down

0 comments on commit b5ed52d

Please sign in to comment.