Skip to content

Commit

Permalink
wait 1s to allow time to disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuto committed Mar 1, 2023
1 parent d10a85a commit 437721f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/WebSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { log } from './Log';
import * as Config from './Config';
import * as RPC from './RPC';
import { app } from 'electron';
import { wait } from '../functions';

export let client: WebSocket;
const wsURLParams = new URLSearchParams();
Expand Down Expand Up @@ -99,4 +100,5 @@ export function connect(token: string) {
export function disconnect(code?: number) {
log('WebSocket', 'Disconnecting...');
client.close(code);
wait(1000);
}

0 comments on commit 437721f

Please sign in to comment.