Skip to content

getIsActive() returns true when socket is not connected #191

@rendong237

Description

@rendong237

What steps will reproduce the problem?

public function getIsActive()
{
        return ArrayHelper::getValue($this->_pool, "$this->hostname:$this->port") !== false;
}

if before open, invoke getIsActive() return true

if extend connection,require invoke getIsActive to check connection

What's expected?

false

What do you get instead?

true

Additional info

  1. ArrayHelper::getValue($this->_pool, "$this->hostname:$this->port") is null
  2. null !== false
  3. return true
Q A
Yii vesion yii-redis 2.0.11
PHP version
Operating system

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions