From b0fac3ee665bd369eb97d24a2079935a91e495ab Mon Sep 17 00:00:00 2001 From: robert Date: Mon, 15 Jan 2007 23:53:25 +0000 Subject: [PATCH] Fixed some warnings, changed TSocketPool to inherit debugHandler from TSocket reviewed: mcslee revert: yes git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664913 13f79535-47bb-0310-9956-ffa450edef68 --- lib/php/src/transport/TSocket.php | 4 ++-- lib/php/src/transport/TSocketPool.php | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/php/src/transport/TSocket.php b/lib/php/src/transport/TSocket.php index c33a352a..b2bea914 100644 --- a/lib/php/src/transport/TSocket.php +++ b/lib/php/src/transport/TSocket.php @@ -62,14 +62,14 @@ class TSocket extends TTransport { * * @var bool */ - private $debug_ = FALSE; + protected $debug_ = FALSE; /** * Debug handler * * @var mixed */ - private $debugHandler_ = null; + protected $debugHandler_ = null; /** * Socket constructor diff --git a/lib/php/src/transport/TSocketPool.php b/lib/php/src/transport/TSocketPool.php index 8036bea1..4652e0f6 100644 --- a/lib/php/src/transport/TSocketPool.php +++ b/lib/php/src/transport/TSocketPool.php @@ -64,13 +64,6 @@ class TSocketPool extends TSocket { */ private $alwaysTryLast_ = TRUE; - /** - * User can supply their own debug handler instead of error_log - * - * @var mixed - */ - private $debugHandler_ = null; - /** * Socket pool constructor * @@ -85,8 +78,6 @@ class TSocketPool extends TSocket { $debugHandler=null) { parent::__construct(null, 0, $persist, $debugHandler); - $this->debugHandler_ = $debugHandler ? $debugHandler : 'error_log'; - if (!is_array($ports)) { $port = $ports; $ports = array(); @@ -179,7 +170,7 @@ class TSocketPool extends TSocket { // Cache hit...make sure enough the retry interval has elapsed if ($lastFailtime > 0) { $elapsed = time() - $lastFailtime; - if ($elapsed > $retryInterval) { + if ($elapsed > $this->retryInterval_) { $retryIntervalPassed = TRUE; if ($this->debug_) { call_user_func($this->debugHandler_, -- 2.17.1