From c76f5dcca7128d7d120f450b082c315135f11427 Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Sat, 25 Jan 2025 17:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=20keepalive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/services/device/keepalive.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/services/device/keepalive.go b/pkg/services/device/keepalive.go index e2406f1..8c64fe5 100644 --- a/pkg/services/device/keepalive.go +++ b/pkg/services/device/keepalive.go @@ -34,5 +34,8 @@ func StartKeepAlive(client *sipgo.Client) { // StopKeepAlive 停止 keepalive 定时器 func StopKeepAlive() { + if keepaliveTimer == nil { + return + } keepaliveTimer.Stop() }