feat(chatwindow): fix infinite loading
This commit is contained in:
parent
ff34d1043f
commit
806c47e705
|
@ -201,13 +201,6 @@ const useSocket = (
|
||||||
|
|
||||||
connectWs();
|
connectWs();
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
|
||||||
if (ws?.readyState === 1) {
|
|
||||||
ws?.close();
|
|
||||||
console.log('[DEBUG] closed');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}, [ws, url, setIsWSReady, setError]);
|
}, [ws, url, setIsWSReady, setError]);
|
||||||
|
|
||||||
return ws;
|
return ws;
|
||||||
|
|
Loading…
Reference in New Issue