IsConnected now includes a check on sender==null.

Otherwise callls to this method always return True and if(!TelegramClient.IsConnected) TelegramClient.ConnectAsync() wouldn't have the expected result.
This commit is contained in:
solarin 2020-04-05 16:20:09 +04:00
parent 08f3b08277
commit e8ba470357

View file

@ -436,7 +436,7 @@ namespace TLSharp.Core
{
get
{
if (transport == null)
if (transport == null || sender == null)
return false;
return transport.IsConnected;
}