Skip to content

Commit b5ed52d

Browse files
committed
remove code only needed for logging
1 parent e3340ed commit b5ed52d

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Net/Gearman/Worker.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,18 @@ private function connect($server) {
250250

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

253-
list($host, $port) = explode(":", $server);
254-
255253
$this->conn[$server]->send("set_client_id", array("client_id" => $this->id));
256254

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

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

264261
$success = true;
265262

266263
} catch (Net_Gearman_Exception $e) {
267264

268-
list($host, $port) = explode(":", $server);
269-
270265
$this->sleepConnection($server);
271266

272267
}
@@ -295,8 +290,6 @@ private function sleepConnection($server) {
295290
$this->failedConn[$server]++;
296291
}
297292

298-
list($host, $port) = explode(":", $server);
299-
300293
}
301294

302295
/**
@@ -428,8 +421,6 @@ public function beginWork($monitor = null)
428421

429422
} catch (Net_Gearman_Exception $e) {
430423

431-
list($host, $port) = explode(":", $server);
432-
433424
$this->sleepConnection($server);
434425
}
435426

@@ -457,7 +448,6 @@ public function beginWork($monitor = null)
457448
try {
458449
$conn->send('pre_sleep');
459450
} catch (Net_Gearman_Exception $e) {
460-
list($host, $port) = explode(":", $server);
461451
$this->sleepConnection($server);
462452
}
463453
}
@@ -486,7 +476,6 @@ public function beginWork($monitor = null)
486476
$errno = socket_last_error($conn->socket);
487477
if ($errno > 0){ // 0 means timeout which is normal
488478
$this->sleepConnection($server);
489-
list($host, $port) = explode(":", $server);
490479
}
491480
}
492481
}
@@ -551,7 +540,6 @@ protected function retryConnections() {
551540
}
552541

553542
if (($lastTry + $retryTime) < $now) {
554-
list($host, $port) = explode(":", $s);
555543
/**
556544
* If we reconnect to a server, don't sleep
557545
*/
@@ -598,7 +586,6 @@ protected function doWork($conn)
598586
break;
599587
}
600588
}
601-
list($host, $port) = explode(":", $server);
602589
return false;
603590
}
604591

0 commit comments

Comments
 (0)