Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Jan 22, 2019
1 parent 484a88c commit 475d7d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Pool/AbstractPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public function getObj(float $timeout = null, int $beforeUseTryTimes = 3)
$this->createdNum--;
unset($this->objHash[$hash]);
}
}else{
$this->createdNum--;
}
//同样进入调度等待,理论上此处可以马上pop出来
$obj = $this->poolChannel->pop($timeout);
Expand Down Expand Up @@ -226,6 +228,8 @@ public function keepMin(?int $num = null): int
if (!$this->putObject($obj)) {
$this->createdNum--;
}
}else{
$this->createdNum--;
}

}
Expand Down

0 comments on commit 475d7d3

Please sign in to comment.