sochix / TLSharp

Telegram client library implemented in C#
1.01k stars 380 forks source link

I think RequestWithDcMigration needs timeout #869

Open artygrand opened 5 years ago

artygrand commented 5 years ago

Forever loop caused, if phone without country code passed to SendCodeRequestAsync, for example.

knocte commented 5 years ago

Please send a pull-request.

knocte commented 5 years ago

Wait a sec, is the forever-loop happening inside TLSharp?

artygrand commented 5 years ago

Yes. If telegram returns DataCenterMigrationException from every DC, request cannot be completed

knocte commented 5 years ago

But there should be a way to detect the infinite loop without using a timeout.