Fixed some warnings, changed TSocketPool to inherit debugHandler from TSocket
authorrobert <dev-null@apache.org>
Mon, 15 Jan 2007 23:53:25 +0000 (23:53 +0000)
committerrobert <dev-null@apache.org>
Mon, 15 Jan 2007 23:53:25 +0000 (23:53 +0000)
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
lib/php/src/transport/TSocketPool.php

index c33a352..b2bea91 100644 (file)
@@ -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
index 8036bea..4652e0f 100644 (file)
@@ -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_,