mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-01-11 03:00:05 +01:00
Start keep-alive pings only after authorization key
This commit is contained in:
parent
f66872cb32
commit
701795efe9
|
|
@ -130,6 +130,7 @@ namespace WTelegram
|
|||
if (_session.AuthKey == null)
|
||||
await CreateAuthorizationKey(this, _session);
|
||||
|
||||
var keepAliveTask = KeepAlive(_cts.Token);
|
||||
TLConfig = await this.InvokeWithLayer<Config>(Layer.Version,
|
||||
Schema.InitConnection(_apiId,
|
||||
Config("device_model"),
|
||||
|
|
@ -180,7 +181,6 @@ namespace WTelegram
|
|||
private async Task Reactor(NetworkStream stream, CancellationTokenSource cts)
|
||||
{
|
||||
int reconnects = 0;
|
||||
var keepAliveTask = KeepAlive(cts.Token);
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
ITLObject obj = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue