refactor(weChat): 移除WebSocket重复连接检查逻辑
不再检查WebSocket连接状态,直接进行连接操作
This commit is contained in:
@@ -106,10 +106,10 @@ export const initSocket = () => {
|
||||
const { status } = useWebSocketStore.getState();
|
||||
|
||||
// 如果已经连接或正在连接,则不重复连接
|
||||
if (["connected", "connecting"].includes(status)) {
|
||||
console.log("WebSocket已连接或正在连接,跳过重复连接", { status });
|
||||
return;
|
||||
}
|
||||
// if (["connected", "connecting"].includes(status)) {
|
||||
// console.log("WebSocket已连接或正在连接,跳过重复连接", { status });
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 从store获取token和accountId
|
||||
const { token2 } = useUserStore.getState();
|
||||
|
||||
Reference in New Issue
Block a user