As #308 mentioned, lines 512-534
|
async def get_connection(self, host, port, init_func=None): |
|
self.register_host_port(host, port, init_func) |
|
|
|
ret = None |
|
for task in self.pools[(host, port, init_func)][::]: |
|
if task.done(): |
|
if task.exception(): |
|
self.pools[(host, port, init_func)].remove(task) |
|
continue |
|
|
|
reader, writer, *other = task.result() |
|
if writer.transport.is_closing(): |
|
self.pools[(host, port, init_func)].remove(task) |
|
continue |
|
|
|
if not ret: |
|
self.pools[(host, port, init_func)].remove(task) |
|
ret = (reader, writer, *other) |
|
|
|
self.register_host_port(host, port, init_func) |
|
if ret: |
|
return ret |
|
return await self.open_tg_connection(host, port, init_func) |
cause the proxy user to reconnect several times. In particular, it cycles through reconnecting->updating->reconnecting->... until eventually getting connected after some time. However, I have only one proxy user and this behaviour seems to be wrong, as it takes a very long time to reconnect and fetch updates. Is there any meaningful fix to this part other than completely disabling this part of the code?
As #308 mentioned, lines 512-534
mtprotoproxy/mtprotoproxy.py
Lines 512 to 534 in bc841cf
cause the proxy user to reconnect several times. In particular, it cycles through reconnecting->updating->reconnecting->... until eventually getting connected after some time. However, I have only one proxy user and this behaviour seems to be wrong, as it takes a very long time to reconnect and fetch updates. Is there any meaningful fix to this part other than completely disabling this part of the code?