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