Fix issue with WS not sending any updates for Centers
This commit is contained in:
18
src/main.ts
18
src/main.ts
@@ -1,4 +1,6 @@
|
||||
import {Center} from "./Center/Center";
|
||||
import {CenterSessionManager} from "./Center/CenterSessionManager";
|
||||
import {Client} from "./Client/Client";
|
||||
import ClientSessionManager from "./Client/ClientSessionManager";
|
||||
import {HttpServer} from "./HttpServer/HttpServer";
|
||||
import Logger from "./Logger";
|
||||
@@ -29,6 +31,22 @@ function cleanup(): void {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
let client: Client = await clientManager.getSession(0) as Client
|
||||
let center: Center = await centerManager.getSession(0) as Center;
|
||||
setInterval(async () => {
|
||||
await client.doConnect();
|
||||
setTimeout(async () => {
|
||||
await client.doBind();
|
||||
setTimeout(async () => {
|
||||
await center.close();
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
// main();
|
||||
|
||||
// process.on('exit', cleanup);
|
||||
// process.on('SIGINT', cleanup);
|
||||
// process.on('SIGUSR1', cleanup);
|
||||
|
Reference in New Issue
Block a user