Skip to content

Commit

Permalink
Fixed pool maxIdelTime bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stelin committed May 26, 2019
1 parent 787d199 commit 6c2d12b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/Connection/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function initialize(Pool $pool, Database $database)
{
$this->pool = $pool;
$this->database = $database;
$this->lastTime = time();

// We need to initialize a query grammar and the query post processors
// which are both very important parts of the database abstractions
Expand Down Expand Up @@ -182,11 +183,11 @@ public function create(): void
*/
public function close(): void
{
if(!empty($this->pdo)){
if (!empty($this->pdo)) {
$this->pdo = null;
}

if(!empty($this->readPdo)){
if (!empty($this->readPdo)) {
$this->readPdo = null;
}
}
Expand Down Expand Up @@ -227,14 +228,6 @@ public function release(bool $force = false): void
}
}

/**
* @return int
*/
public function getLastTime(): int
{
return time();
}

/**
* @return Grammar
*/
Expand Down

0 comments on commit 6c2d12b

Please sign in to comment.