mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-01-10 10:41:21 +01:00
Fix: ReactorError wasn't always triggered correctly on connection lost
This commit is contained in:
parent
37b8f6c054
commit
c8a0882587
|
|
@ -620,7 +620,7 @@ namespace WTelegram
|
|||
chats = (await this.Messages_GetChats(chat.chat_id)).chats };
|
||||
case InputPeerChannel channel:
|
||||
return await this.Channels_EditAdmin(channel, user,
|
||||
new ChatAdminRights { flags = is_admin ? (ChatAdminRights.Flags)0x8BF : 0 }, null);
|
||||
new ChatAdminRights { flags = is_admin ? (ChatAdminRights.Flags)0x1E8BF : 0 }, null);
|
||||
default:
|
||||
throw new ArgumentException(OnlyChatChannel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ namespace WTelegram
|
|||
lock (_pendingRpcs) // abort all pending requests
|
||||
{
|
||||
foreach (var rpc in _pendingRpcs.Values)
|
||||
rpc.tcs.SetException(ex);
|
||||
rpc.tcs.TrySetException(ex);
|
||||
_pendingRpcs.Clear();
|
||||
_bareRpc = null;
|
||||
}
|
||||
|
|
@ -879,9 +879,9 @@ namespace WTelegram
|
|||
if (defaultDc != 0) _dcSession ??= _session.DCSessions.GetValueOrDefault(defaultDc);
|
||||
_dcSession ??= new() { Id = Helpers.RandomLong() };
|
||||
_dcSession.Client = this;
|
||||
_dcSession.DataCenter = null;
|
||||
Helpers.Log(2, $"Connecting to {endpoint}...");
|
||||
tcpClient = await TcpHandler(endpoint.Address.ToString(), endpoint.Port);
|
||||
_dcSession.DataCenter = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 179 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
|
||||
<Copyright>Copyright © Olivier Marcoux 2021-2024</Copyright>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/wiz0u/WTelegramClient</PackageProjectUrl>
|
||||
<PackageProjectUrl>https://wiz0u.github.io/WTelegramClient</PackageProjectUrl>
|
||||
<PackageIcon>logo.png</PackageIcon>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<RepositoryUrl>https://github.com/wiz0u/WTelegramClient.git</RepositoryUrl>
|
||||
|
|
|
|||
Loading…
Reference in a new issue