改名
This commit is contained in:
+7
-1
@@ -68,9 +68,15 @@ class PDO
|
||||
*/
|
||||
public function heartbeat_check(): void
|
||||
{
|
||||
if (env('state') == 'exit') {
|
||||
return;
|
||||
}
|
||||
if ($this->_timer === -1 && Context::inCoroutine()) {
|
||||
$this->_timer = Timer::tick(3000, function () {
|
||||
$this->_timer = Timer::tick(1000, function () {
|
||||
try {
|
||||
if (env('state') == 'exit') {
|
||||
$this->stopHeartbeatCheck();
|
||||
}
|
||||
if (time() - $this->_last > 10 * 60) {
|
||||
$this->stopHeartbeatCheck();
|
||||
$this->pdo = null;
|
||||
|
||||
Reference in New Issue
Block a user