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

@@ -761,7 +761,10 @@ onMounted(() => {
onUnmounted(() => {
clipboard.value.destroy()
socket.value = null
if (socket.value !== null) {
socket.value.close()
socket.value = null
}
})
// 初始化数据
@@ -779,10 +782,6 @@ const initData = () => {
});
}
onUnmounted(() => {
clipboard.value.destroy()
})
const mjPower = ref(1)
const mjActionPower = ref(1)
httpGet("/api/config/get?key=system").then(res => {