Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnection doesn't work #79

Open
innovative-sol opened this issue Mar 9, 2021 · 3 comments
Open

Reconnection doesn't work #79

innovative-sol opened this issue Mar 9, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@innovative-sol
Copy link

Hi,

If you try calling client.Reconnect() after the connection is successful (let's say 30 seconds after connection) the app is unable to reconnect to the Telegram servers. It just hangs... (maybe some mutex or full channel)

Daniel

@innovative-sol innovative-sol changed the title Reconnection does'nt work Reconnection doesn't work Mar 9, 2021
@quenbyako
Copy link
Member

@innovative-sol thanks for this notice, we'll try to find this bug

i think we need refactor a bit MTProto{} type, cuz everything is stacked in single struct. Maybe we need to split it at least on transport subpackage and messages, so we can find bugs like this one faster.

@quenbyako quenbyako added the bug Something isn't working label Mar 9, 2021
@paskal
Copy link
Contributor

paskal commented Jun 17, 2021

Thanks for the package! With v1.0.0 there is no reconnect function, and the current master version throws a panic which is no longer caught by MTProto .RecoverFunc and I don't have any idea on how to catch it:

panic: reading message: reading message: required to reconnect!: read tcp 172.23.0.2:33290->149.154.167.50:443: i/o timeout

goroutine 35 [running]:
github.com/xelaj/mtproto.check(...)
 /src/vendor/github.com/xelaj/mtproto/utils.go:50
github.com/xelaj/mtproto.(*MTProto).startReadingResponses.func1(0x40003b0360, 0x7503d8, 0x400038c340)
 /src/vendor/github.com/xelaj/mtproto/mtproto.go:265 +0x1f8
created by github.com/xelaj/mtproto.(*MTProto).startReadingResponses
 /src/vendor/github.com/xelaj/mtproto/mtproto.go:246 +0x68

@dmitrytrager
Copy link

Having the same problem. It fires with panic and breaks the process after a couple of minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants