From a19d526e727f2ea5153bf84a71902cb97d17699e Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 18 Aug 2023 15:02:08 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/datatransferlogic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index e216707f..fada3747 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -94,7 +94,7 @@ func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) ) isAuth, userInfo = l.checkAuth(r) if !isAuth { - //time.Sleep(time.Second * 1) //兼容下火狐 + time.Sleep(time.Second * 1) //兼容下火狐 rsp := websocket_data.DataTransferData{ T: constants.WEBSOCKET_UNAUTH, D: nil, @@ -151,7 +151,7 @@ func (l *DataTransferLogic) setConnPool(conn *websocket.Conn, userInfo auth.User mapConnPool.Store(uniqueId, ws) go func() { //把连接成功消息发回去 - //time.Sleep(time.Second * 1) //兼容下火狐 + time.Sleep(time.Second * 1) //兼容下火狐 ws.sendToOutChan(ws.respondDataFormat(constants.WEBSOCKET_CONNECT_SUCCESS, uniqueId)) }() return ws