改名
This commit is contained in:
@@ -18,7 +18,6 @@ use Swoole\Timer;
|
||||
class Connection extends Pool
|
||||
{
|
||||
|
||||
use Timeout;
|
||||
|
||||
public array $hasCreate = [];
|
||||
|
||||
@@ -179,9 +178,6 @@ class Connection extends Pool
|
||||
if ($number = Context::getContext('begin_' . $coroutineName, Coroutine::getCid())) {
|
||||
$number > 0 && $link->beginTransaction();
|
||||
}
|
||||
if ($this->creates === 0) {
|
||||
$this->creates = Timer::tick(1000, [$this, 'Heartbeat_detection']);
|
||||
}
|
||||
return $link;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ use Swoole\Timer;
|
||||
class Redis extends Pool
|
||||
{
|
||||
|
||||
use Timeout;
|
||||
|
||||
|
||||
private int $_create = 0;
|
||||
|
||||
@@ -10,7 +10,7 @@ use Swoole\Timer;
|
||||
trait Timeout
|
||||
{
|
||||
|
||||
private int $creates = 0;
|
||||
private int $creates = -1;
|
||||
|
||||
|
||||
private int $lastTime = 0;
|
||||
|
||||
Reference in New Issue
Block a user