diff --git a/System/Cache/Base/Redis.php b/System/Cache/Base/Redis.php index 8088ceb2..750d27d2 100644 --- a/System/Cache/Base/Redis.php +++ b/System/Cache/Base/Redis.php @@ -92,7 +92,7 @@ class Redis implements StopHeartbeatCheck */ public function stopHeartbeatCheck(): void { - if (Context::inCoroutine()) { + if ($this->_timer > -1) { Timer::clear($this->_timer); } $this->_timer = -1;