fix
This commit is contained in:
parent
6c36817750
commit
b8dbda6a4c
|
@ -19,10 +19,10 @@ func (w *wsConnectItem) newAllocationProcessor(msgType constants.Websocket) allo
|
|||
switch msgType {
|
||||
//图片渲染
|
||||
case constants.WEBSOCKET_RENDER_IMAGE:
|
||||
obj = &renderProcesser{w}
|
||||
obj = &renderProcessor{w}
|
||||
//刷新重连请求恢复上次连接的标识
|
||||
case constants.WEBSOCKET_REQUEST_REUSE_LAST_CONNECT:
|
||||
obj = &reuseConnProcesser{w}
|
||||
obj = &reuseConnProcessor{w}
|
||||
default:
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
)
|
||||
|
||||
// 渲染处理器
|
||||
type renderProcesser struct {
|
||||
type renderProcessor struct {
|
||||
w *wsConnectItem
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,8 @@ type renderTask struct {
|
|||
uploadUnityRenderImageTakesTime int64 //上传unity渲染结果图时间
|
||||
}
|
||||
|
||||
func (r *renderProcesser) allocationMessage(data []byte) {
|
||||
func (r *renderProcessor) allocationMessage(data []byte) {
|
||||
logx.Info("收到渲染任务消息:", string(data))
|
||||
select {
|
||||
case <-r.w.closeChan: //已经关闭
|
||||
return
|
||||
|
|
|
@ -10,11 +10,11 @@ import (
|
|||
)
|
||||
|
||||
// 复用连接处理器
|
||||
type reuseConnProcesser struct {
|
||||
type reuseConnProcessor struct {
|
||||
w *wsConnectItem
|
||||
}
|
||||
|
||||
func (r *reuseConnProcesser) allocationMessage(data []byte) {
|
||||
func (r *reuseConnProcessor) allocationMessage(data []byte) {
|
||||
logx.Info("收到请求恢复上次连接标识数据:", string(data))
|
||||
var wid string
|
||||
if err := json.Unmarshal(data, &wid); err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user