decrease RTMT_WS_PING_INTERVAL

This commit is contained in:
Halit Aksoy 2022-09-05 18:10:49 +03:00
parent 3af7da905d
commit 49ae3fa9ec
2 changed files with 3 additions and 3 deletions

1
src/consts/config.ts Normal file
View File

@ -0,0 +1 @@
export const RTMT_WS_PING_INTERVAL = 1000;

View File

@ -4,8 +4,7 @@ import { Bytes, OnClientConnectionChange, OnMessage, RTMT } from "./rtmt"
import WebSocket from "ws"
import * as http from 'http';
import { channel_ping, channel_pong } from "../consts/channel_names";
const PING_INTERVAL = 15000;
import { RTMT_WS_PING_INTERVAL } from "../consts/config";
export class RTMTWS implements RTMT {
@ -115,7 +114,7 @@ export class RTMTWS implements RTMT {
ws.isAlive = false;
sendMessageInternal(ws, channel_ping, {});
});
}, PING_INTERVAL);
}, RTMT_WS_PING_INTERVAL);
}
stopPingInterval() {