This commit is contained in:
as2252258@163.com
2021-09-04 00:08:34 +08:00
parent 991095ae50
commit abd043ee15
10 changed files with 1503 additions and 1511 deletions
+2 -2
View File
@@ -66,13 +66,13 @@ class Redis implements StopHeartbeatCheck
*/
public function heartbeat_check(): void
{
if (env('state') == 'exit') {
if (env('state','start') == 'exit') {
return;
}
if ($this->_timer === -1 && Context::inCoroutine()) {
$this->_timer = Timer::tick(1000, function () {
try {
if (env('state') == 'exit') {
if (env('state','start') == 'exit') {
echo 'timer end.' . PHP_EOL;
}
if (time() - $this->_last > 10 * 60) {