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) {