Use more ResetAsync/DisposeAsync internally for better async

This commit is contained in:
Wizou 2024-09-07 18:43:52 +02:00
parent 62a691359b
commit 68a1c8650f
2 changed files with 4 additions and 4 deletions

2
.github/dev.yml vendored
View file

@ -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

View file

@ -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;