Skip to content

Commit

Permalink
update redis
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed May 13, 2020
1 parent 2ca7f30 commit 661c479
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/BaseRedis.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ public function __construct($config = null)
$this->connection = $this->pool->getConnection();
}

public function __destruct()
{
$this->pool->close($this->connection);
}

public function __call($name, $arguments)
{
return $this->connection->{$name}(...$arguments);
}

public function close($connection = null)
{
$this->pool->close($connection);
}
}

0 comments on commit 661c479

Please sign in to comment.