wiz0u / WTelegramClient

Telegram Client API (MTProto) library written 100% in C# and .NET
https://wiz0u.github.io/WTelegramClient/
MIT License
996 stars 164 forks source link

ReactorError and and inability to recreate the client #130

Closed LightBarSky closed 1 year ago

LightBarSky commented 1 year ago

I use several pre-created sessions, when intercepting a ReactorError in one of them, as indicated in FAQ 11, I recreate the client by destroying it with the Dispose() method. However, I can't create a new client object because the session is occupied by another process, Dispose() for _session is missing somewhere.

LightBarSky commented 1 year ago

I forgot to add, these changes appeared after the last update, before that everything was fine.

awskt commented 1 year ago

Duplicate of #128 Fixed in 3.2.3-dev.5

wiz0u commented 1 year ago

Duplicate of #128

LightBarSky commented 1 year ago

Duplicate of #128

After the update, the problem persisted. With Reactor Error isMainDC goes false and the _session object is not destroyed

wiz0u commented 1 year ago

Sounds like a bug. You're not supposed to get ReactorError (and dispose the client) for alt DC, only for the main DC.

This issue should now be fixed in 3.3.2-dev.1 (b63829393e4acffe30eae21a5b083e914d9dd7d8)

wiz0u commented 1 year ago

Disconnections of alt DCs are expected and normal. See https://wiz0u.github.io/WTelegramClient/FAQ.html#shutdown