From 7e7cc07c4d6bf23d6d28da6b1fdd3453ff8ae7b6 Mon Sep 17 00:00:00 2001 From: lijun Date: Wed, 22 Jan 2025 14:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index 817d53d..99ff9fe 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -193,14 +193,13 @@ func GetRealTimeImage(c *gin.Context) { return } worker.SetRedisWithExpire(strconv.Itoa(int(device.ID))+"_is_play", "1", time.Minute*5) - log.Printf("device_id:%d has set is_play to 1", deviceIdInt) isGetting = worker.GetRedis(fmt.Sprintf("device_%d_is_getting", device.ID)) if isGetting != "true" { c.JSON(http.StatusOK, gin.H{"code": 5, "message": "device is not getting or not exist"}) log.Printf("device_id:%d is not getting or not exist", deviceIdInt) return } - go subscribeAndHandleMessagesV3(ws, deviceIdInt) + subscribeAndHandleMessagesV3(ws, deviceIdInt) } func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) {