This commit is contained in:
2021-04-27 18:42:20 +08:00
parent 2bd70dd644
commit 65adf7c66d
+3 -6
View File
@@ -191,10 +191,7 @@ abstract class Pool extends Component
if ($this->creates === -1 && !is_callable($callback)) {
$this->creates = Timer::tick(1000, [$this, 'Heartbeat_detection']);
}
if (!Context::hasContext('create::client::ing::' . $name)) {
$this->_items[$name]->push($this->createClient($name, $callback));
Context::remove('create::client::ing::' . $name);
}
$this->_items[$name]->push($this->createClient($name, $callback));
}
@@ -220,10 +217,10 @@ abstract class Pool extends Component
/**
* @param string $name
* @param $client
* @return mixed
* @return bool
* 检查连接可靠性
*/
public function checkCanUse(string $name, mixed $client): mixed
public function checkCanUse(string $name, mixed $client): bool
{
return true;
}