改名
This commit is contained in:
@@ -10,6 +10,7 @@ use HttpServer\Http\Context;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use PDO;
|
||||
use Redis;
|
||||
use Snowflake\Pool\Timeout;
|
||||
use Swoole\Coroutine;
|
||||
use Swoole\Coroutine\Channel;
|
||||
use Swoole\Timer;
|
||||
@@ -26,6 +27,8 @@ abstract class Pool extends Component
|
||||
|
||||
protected int $max = 60;
|
||||
|
||||
use Timeout;
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param false $isMaster
|
||||
@@ -127,6 +130,10 @@ abstract class Pool extends Component
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->creates === 0) {
|
||||
$this->creates = Timer::tick(1000, [$this, 'Heartbeat_detection']);
|
||||
}
|
||||
|
||||
Context::setContext('create:connect:' . $coroutineName, 1);
|
||||
|
||||
$this->push($coroutineName, call_user_func($createHandler, ...$config));
|
||||
|
||||
Reference in New Issue
Block a user