fix: 清除旧的反向ws

This commit is contained in:
手瓜一十雪 2024-06-28 13:42:09 +08:00
parent a643fac073
commit f854c258bd

View File

@ -12,7 +12,7 @@ import { ob11Config } from '@/onebot11/config';
import { napCatCore } from '@/core';
import { selfInfo } from '@/core/data';
export const rwsList: ReverseWebsocket[] = [];
export let rwsList: ReverseWebsocket[] = [];
export class ReverseWebsocket {
public websocket: WebSocketClass | undefined;
@ -133,6 +133,7 @@ class OB11ReverseWebsockets {
for (const rws of rwsList) {
rws.stop();
}
rwsList = [];//清空旧的反向ws
}
restart() {