qqq
This commit is contained in:
+4
-4
@@ -151,12 +151,12 @@ class Connection extends Component
|
|||||||
protected function getNormalClientHealth(): PDO
|
protected function getNormalClientHealth(): PDO
|
||||||
{
|
{
|
||||||
[$client, $time] = $this->pool()->get($this->cds);
|
[$client, $time] = $this->pool()->get($this->cds);
|
||||||
if ((time() - $time) > $this->idle_time) {
|
if ((time() - $time) < $this->idle_time || $this->canUse($client)) {
|
||||||
return $this->getNormalClientHealth();
|
|
||||||
}
|
|
||||||
if ($this->canUse($client)) {
|
|
||||||
return $client;
|
return $client;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$this->pool()->abandon($this->cds);
|
||||||
|
|
||||||
Waite::sleep(10);
|
Waite::sleep(10);
|
||||||
return $this->getNormalClientHealth();
|
return $this->getNormalClientHealth();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user