close ws
This commit is contained in:
parent
ab5b5720af
commit
a76c87b3df
@ -472,18 +472,20 @@ function daysLeft(targetDate) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(async() => {
|
||||||
if (socket) {
|
|
||||||
if (socket.readyState === WebSocket.OPEN) {
|
try {
|
||||||
socket.close(); // Close the WebSocket connection
|
//socket?.send('close')
|
||||||
}
|
socket?.close();
|
||||||
socket = null; // Ensure socket is set to null
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
}
|
}
|
||||||
if (audio) {
|
if (audio) {
|
||||||
audio.pause();
|
audio.pause();
|
||||||
audio = null;
|
audio = null;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
async function assetSelector(symbol, assetType)
|
async function assetSelector(symbol, assetType)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user