private function stopHeartbeat() { if ($this->hTimer !== null) { $this->hTimer->cancel(); $this->hTimer = null; } }