mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-12 09:09:45 +01:00
GramJs: Bring back PingDelayDisconnect
This commit is contained in:
parent
265c710d19
commit
03608959e6
@ -195,8 +195,9 @@ class TelegramClient {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await attempts(() => {
|
await attempts(() => {
|
||||||
return timeout(this._sender.send(new requests.Ping({
|
return timeout(this._sender.send(new requests.PingDelayDisconnect({
|
||||||
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user