示例#1
0
 public function __destruct()
 {
     if ($this->conn) {
         phpiredis_disconnect($this->conn);
     }
 }
示例#2
0
 /**
  * @param bool $force
  */
 public function disconnect($force = false)
 {
     // connection may not have been successful, yet somebody may still call disconnect(),
     // so here's a little check for that
     if ($this->connection) {
         phpiredis_disconnect($this->connection, $force);
     }
     $this->connection = null;
 }