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
diff --git a/lib/php/src/transport/TSocket.php b/lib/php/src/transport/TSocket.php
index c33a352..b2bea91 100644
--- a/lib/php/src/transport/TSocket.php
+++ b/lib/php/src/transport/TSocket.php
@@ -62,14 +62,14 @@
*
* @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 8036bea..4652e0f 100644
--- a/lib/php/src/transport/TSocketPool.php
+++ b/lib/php/src/transport/TSocketPool.php
@@ -65,13 +65,6 @@
private $alwaysTryLast_ = TRUE;
/**
- * User can supply their own debug handler instead of error_log
- *
- * @var mixed
- */
- private $debugHandler_ = null;
-
- /**
* Socket pool constructor
*
* @param array $hosts List of remote hostnames
@@ -85,8 +78,6 @@
$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 @@
// 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_,