测试内存泄露问题
This commit is contained in:
parent
b27a7fb7cc
commit
795cc35396
|
|
@ -195,14 +195,13 @@ func subscribeAndHandleMessagesV6(ws *websocket.Conn, deviceId int) {
|
|||
count := 0
|
||||
//定时器,发送计数器
|
||||
tCount := 0
|
||||
var buf []byte
|
||||
//计算帧率
|
||||
for {
|
||||
//从service获取当前帧
|
||||
c := service.DeviceFrameCount[deviceId]
|
||||
if c != count {
|
||||
count = c
|
||||
buf = service.Device1CurrentFrame.ToBytes()
|
||||
buf := service.Device1CurrentFrame.ToBytes()
|
||||
err2 := ws.WriteMessage(websocket.BinaryMessage, buf)
|
||||
if err2 != nil {
|
||||
log.Printf("send message to client err:%v", err2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue