This commit is contained in:
laodaming 2023-09-05 14:39:35 +08:00
parent afe85433fd
commit fdb4abce3d

View File

@ -164,7 +164,7 @@ func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request)
return
}
//循环读客户端信息
go ws.acceptBrowserMessage()
go ws.reciveBrowserMessage()
//消费出口数据并发送浏览器端
go ws.consumeOutChanData()
//消费入口数据
@ -487,7 +487,7 @@ func (w *wsConnectItem) consumeInChanData() {
}
// 接受浏览器端发来的消息并写入入口缓冲队列
func (w *wsConnectItem) acceptBrowserMessage() {
func (w *wsConnectItem) reciveBrowserMessage() {
defer func() {
if err := recover(); err != nil {
logx.Error("acceptBrowserMessage panic:", err)