This commit is contained in:
2021-04-27 17:46:57 +08:00
parent 6aa472ceca
commit 23a9607272
+8 -8
View File
@@ -168,14 +168,14 @@ abstract class Pool extends Component
if (!Context::inCoroutine()) { if (!Context::inCoroutine()) {
return $this->createClient($name, $callback); return $this->createClient($name, $callback);
} }
if ($this->_items[$name]->length() > 10) { // if ($this->_items[$name]->length() > 10) {
$connection = $this->_items[$name]->pop(); // $connection = $this->_items[$name]->pop();
if (!$this->checkCanUse($name, $connection)) { // if (!$this->checkCanUse($name, $connection)) {
return $this->createClient($name, $callback); // return $this->createClient($name, $callback);
} else { // } else {
return $connection; // return $connection;
} // }
} // }
return $this->createByCallback($name, $callback); return $this->createByCallback($name, $callback);
} }