内存泄漏解决测试

This commit is contained in:
lijun 2025-01-22 13:57:11 +08:00
parent 4d7521e4b5
commit c0219ce83c
1 changed files with 4 additions and 4 deletions

View File

@ -218,6 +218,10 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) {
for {
//从service获取当前帧
img, c := service.GetDeviceCurrentFrameV3(device_id)
t++
if t%10 == 0 {
log.Printf("device:%d send frame count:%d,img is closed", device_id, c)
}
if c != count {
if c == -1 {
log.Printf("device:%d get frame err!", device_id)
@ -235,10 +239,6 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) {
worker.SetRedisSetRemove(online_conn_key, con_id)
break
}
t++
if t%10 == 0 {
log.Printf("device:%d send frame count:%d,img is closed", device_id, c)
}
buf1 := buf.GetBytes()
err2 := ws.WriteMessage(websocket.BinaryMessage, buf1)