mirror of
https://github.com/ragestudio/comty.js.git
synced 2025-06-09 02:24:18 +00:00
improve socket disconection to suport rtengineng
This commit is contained in:
parent
1838d32fe0
commit
3a2c3aeef0
@ -98,10 +98,10 @@ class WebsocketManager {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
const isConnected =
|
||||||
socket.connected === true &&
|
socket.connected === true || socket.state?.connected === true
|
||||||
typeof socket.disconnect === "function"
|
|
||||||
) {
|
if (isConnected && typeof socket.disconnect === "function") {
|
||||||
await socket.disconnect()
|
await socket.disconnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user