mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
* HandleUpdate fixed for the case where there are no subscribers.
* main event loop added to TelegramClient as a single function call.
This commit is contained in:
parent
76362061f6
commit
936a26c6bd
|
|
@ -330,6 +330,7 @@ namespace TLSharp.Core.Network
|
|||
{ // rpc_error
|
||||
int errorCode = messageReader.ReadInt32();
|
||||
string errorMessage = Serializers.String.read(messageReader);
|
||||
Console.Error.WriteLine($"ERROR: {errorMessage} - {errorCode}");
|
||||
|
||||
if (errorMessage.StartsWith("FLOOD_WAIT_"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,9 +113,17 @@ namespace TLSharp.Core
|
|||
}
|
||||
}
|
||||
|
||||
public async Task MainLoopAsync()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
await WaitEventAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private void _sender_UpdatesEvent (TLAbsUpdates updates)
|
||||
{
|
||||
Updates (this, updates);
|
||||
Updates?.Invoke (this, updates);
|
||||
}
|
||||
|
||||
private async Task RequestWithDcMigration(TLMethod request)
|
||||
|
|
|
|||
Loading…
Reference in a new issue