Skip to content

Commit

Permalink
fix: 清除旧的反向ws
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Jun 28, 2024
1 parent a643fac commit f854c25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/onebot11/server/ws/ReverseWebsocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -133,6 +133,7 @@ class OB11ReverseWebsockets {
for (const rws of rwsList) {
rws.stop();
}
rwsList = [];//清空旧的反向ws
}

restart() {
Expand Down

0 comments on commit f854c25

Please sign in to comment.