This commit is contained in:
2020-09-04 19:18:35 +08:00
parent 4735496b45
commit 4b014193c9
2 changed files with 1 additions and 6 deletions
-5
View File
@@ -20,8 +20,6 @@ abstract class Pool extends Component
protected $max = 60;
private $is_ticker = false;
/**
* @param $name
* @param false $isMaster
@@ -46,9 +44,6 @@ abstract class Pool extends Component
*/
protected function get($name, $timeout = -1)
{
if ($this->is_ticker) {
Coroutine::sleep(1);
}
if ($timeout != -1) {
$client = $this->_items[$name]->pop($timeout);
} else {
+1 -1
View File
@@ -189,7 +189,7 @@ class Connection extends Pool
$this->info('client has :' . $this->size($coroutineName));
[$time, $client] = $this->get($coroutineName, -1);
$this->info('client has create :' . ($this->hasCreate[$coroutineName] ?? 0));
$this->info('client has create :' . ($this->hasCreate[$coroutineName] ?? 0) . ':' . $this->max);
if ($client instanceof PDO) {
return $this->saveClient($coroutineName, $client);
}