opt: close unused websocket connections

This commit is contained in:
RockYang
2024-04-30 22:54:39 +08:00
parent c0a7f41747
commit 3db55cbd48
17 changed files with 144 additions and 85 deletions

View File

@@ -330,7 +330,10 @@ onMounted(() => {
});
onUnmounted(() => {
socket.value = null
if (socket.value !== null) {
socket.value.close()
socket.value = null
}
})
// 初始化数据