内存泄漏解决测试
This commit is contained in:
parent
bf6546069b
commit
7e7cc07c4d
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue