sochix / TLSharp

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

Core: allow re-connecting from same TelegramClient #937

Open knocte opened 4 years ago

knocte commented 4 years ago

If the connection dropped, there was no way to reconnect from the same instance of TelegramClient.

solarin commented 4 years ago

but in this way you are not changing the TcpTransport initialization in the constructor either?

solarin commented 4 years ago

i the TcpTransport initialization, in the constructor, should be changed since we are working on this issue and we have a chance to make it better

knocte commented 4 years ago

but in this way you are not changing the TcpTransport initialization in the constructor either?

why change that? we create a new transport on each ConnectAsync() call, and that's it

solarin commented 4 years ago

but in this way you are not changing the TcpTransport initialization in the constructor either?

why change that? we create a new transport on each ConnectAsync() call, and that's it

becauese the connection inside the constructor in TcpTransport is quite terrible

anyways, now i am running your solution. let's see if it works on the long run

solarin commented 4 years ago

yes this seems to be working