获取当前帧bytes,垃圾回收

This commit is contained in:
lijun 2025-01-23 23:03:37 +08:00
parent 2040232735
commit 6bdaeaf017
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import (
"io" "io"
"log" "log"
"net/http" "net/http"
"runtime"
"strconv" "strconv"
"time" "time"
) )
@ -230,4 +231,7 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, deviceId int) {
worker.SetRedisWithExpire(strconv.Itoa(deviceId)+"_is_play", "1", time.Minute*5) worker.SetRedisWithExpire(strconv.Itoa(deviceId)+"_is_play", "1", time.Minute*5)
log.Printf("device_id: %d has set is_play to 0", deviceId) log.Printf("device_id: %d has set is_play to 0", deviceId)
} }
//垃圾回收
runtime.GC()
} }