diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index a91761eb..661adfe1 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -42,6 +42,8 @@ abstract class Pool extends Component $this->max = (int)$max; } + + /** * @param $name * @return array @@ -52,7 +54,7 @@ abstract class Pool extends Component if (!Context::inCoroutine()) { return [0, null]; } - [$timeout, $connection] = $this->_items[$name]->pop(30); + [$timeout, $connection] = $this->_items[$name]->pop(-1); if (empty($timeout) || empty($connection)) { return [0, null]; } @@ -63,6 +65,8 @@ abstract class Pool extends Component } } + + /** * @param $cds * @param false $isMaster @@ -133,6 +137,7 @@ abstract class Pool extends Component Context::deleteId('create:connect:' . $coroutineName); return $client; } + $this->push($coroutineName, $client); Context::deleteId('create:connect:' . $coroutineName);