mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
Use more ResetAsync/DisposeAsync internally for better async
This commit is contained in:
parent
62a691359b
commit
68a1c8650f
2
.github/dev.yml
vendored
2
.github/dev.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
pr: none
|
||||
trigger: [ master ]
|
||||
|
||||
name: 4.1.9-dev.$(Rev:r)
|
||||
name: 4.1.10-dev.$(Rev:r)
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ namespace WTelegram
|
|||
foreach (var altSession in _session.DCSessions.Values)
|
||||
if (altSession.Client != null && altSession.Client != this)
|
||||
{
|
||||
altSession.Client.Dispose();
|
||||
await altSession.Client.DisposeAsync();
|
||||
altSession.Client = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -735,7 +735,7 @@ namespace WTelegram
|
|||
retryLast = false;
|
||||
else
|
||||
{
|
||||
Reset(false, false);
|
||||
await ResetAsync(false, false);
|
||||
_dcSession.Renew();
|
||||
await ConnectAsync();
|
||||
}
|
||||
|
|
@ -1562,7 +1562,7 @@ namespace WTelegram
|
|||
Session.DCSession dcSession;
|
||||
lock (_session)
|
||||
dcSession = GetOrCreateDCSession(dcId, _dcSession.DataCenter.flags);
|
||||
Reset(false, false);
|
||||
await ResetAsync(false, false);
|
||||
_session.MainDC = dcId;
|
||||
_dcSession.Client = null;
|
||||
_dcSession = dcSession;
|
||||
|
|
|
|||
Loading…
Reference in a new issue