fix
This commit is contained in:
parent
a896d42bc1
commit
36aad6a088
|
@ -177,25 +177,6 @@ func (w *wsConnectItem) close() {
|
|||
logx.Info("websocket:", w.flag, " is closed")
|
||||
}
|
||||
|
||||
// 操作连接中渲染任务的增加/删除
|
||||
func (w *wsConnectItem) operationRenderTask() {
|
||||
for {
|
||||
select {
|
||||
case <-w.closeChan:
|
||||
return
|
||||
case data := <-w.renderImageTaskCtlChan:
|
||||
switch data.Option {
|
||||
case 0: //删除
|
||||
delete(w.renderImageTask, data.Key)
|
||||
case 1: //新增
|
||||
w.renderImageTask[data.Key] = struct{}{}
|
||||
default:
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 读取输出返回给客户端
|
||||
func (w *wsConnectItem) writeLoop() {
|
||||
for {
|
||||
|
|
|
@ -23,3 +23,22 @@ func (w *wsConnectItem) SendToCloudRender(data []byte) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 操作连接中渲染任务的增加/删除
|
||||
func (w *wsConnectItem) operationRenderTask() {
|
||||
for {
|
||||
select {
|
||||
case <-w.closeChan:
|
||||
return
|
||||
case data := <-w.renderImageTaskCtlChan:
|
||||
switch data.Option {
|
||||
case 0: //删除任务
|
||||
delete(w.renderImageTask, data.Key)
|
||||
case 1: //新增任务
|
||||
w.renderImageTask[data.Key] = struct{}{}
|
||||
default:
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user