mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-05 22:45:38 +00:00
more IAsyncDisposable stuff
This commit is contained in:
parent
9fe6a9d74f
commit
be7027b318
6 changed files with 10 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ namespace WTelegramClientTest
|
|||
}
|
||||
finally
|
||||
{
|
||||
Client?.Dispose();
|
||||
if (Client != null) await Client.DisposeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ namespace WTelegramClientTest
|
|||
while (true)
|
||||
{
|
||||
Console.WriteLine("Disposing the client and trying to reconnect in 5 seconds...");
|
||||
Client?.Dispose();
|
||||
if (Client != null) await Client.DisposeAsync();
|
||||
Client = null;
|
||||
await Task.Delay(5000);
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue