Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Mar 15, 2019
1 parent 850d422 commit 503baa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pool/AbstractPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function gcObject(int $idleTime)
}
}
foreach ($list as $item) {
$this->poolChannel->push($item);
$this->putObject($item);
}
}

Expand Down Expand Up @@ -233,7 +233,7 @@ protected function putObject($object): bool
}
$hash = $object->__objectHash;
//不在的时候说明为其他pool对象,不允许归还,若为true,说明已经归还,禁止重复
if (isset($this->objHash[$hash]) && ($this->objHash[$hash] == false)) {
if (isset($this->objHash[$hash]) && ($this->objHash[$hash] === false)) {
$object->last_recycle_time = time();
$this->objHash[$hash] = true;
$this->poolChannel->push($object);
Expand Down

0 comments on commit 503baa7

Please sign in to comment.