GramJs: Rollback PingDelayDisconnect as it is probably causing disconnects
This commit is contained in:
parent
de06d2514f
commit
1794f3fae4
@ -195,13 +195,13 @@ class TelegramClient {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await attempts(() => {
|
await attempts(() => {
|
||||||
return timeout(this._sender.send(new requests.PingDelayDisconnect({
|
return timeout(this._sender.send(new requests.Ping({
|
||||||
pingId: Helpers.getRandomInt(Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER),
|
pingId: Helpers.getRandomInt(Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER),
|
||||||
disconnectDelay: PING_DISCONNECT_DELAY,
|
|
||||||
})), PING_TIMEOUT);
|
})), PING_TIMEOUT);
|
||||||
}, PING_FAIL_ATTEMPTS, PING_FAIL_INTERVAL);
|
}, PING_FAIL_ATTEMPTS, PING_FAIL_INTERVAL);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('!!!', err);
|
// eslint-disable-next-line no-console
|
||||||
|
console.warn(err);
|
||||||
|
|
||||||
await this.disconnect();
|
await this.disconnect();
|
||||||
this.connect();
|
this.connect();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user