-
Notifications
You must be signed in to change notification settings - Fork 23
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
Loading fresh DC list timeout #2
Comments
Check out this piece of code taken from the Telegram app:
Apparently you need to catch the timeout exception and provide your own datacenter addresses, or something like that. |
I've tested the bot on linux/gentoo (java 1.6.0_45) and perhaps it's a duplicate bug of this one : telegram-s/telegram-api-old#9 (comment) and it's related to the jvm ? |
It works on Windows with jvm 1.6 |
Check out the solution everyone who came here from Google: |
It started working for me after I updated Server IP Address in the MemoryStateAPI class, as shown below - public void start(boolean isTest) {
connections = new HashMap<>();
connections.put(1, new ConnectionInfo[]{
new ConnectionInfo(1, 0, isTest ? "149.154.175.10" : "149.154.175.50", 443)
});
} |
Yes, it's just the Datacenter IPs that are outdated. I just started using this project for learning purposes, and I quickly figured that out. Just needed to follow the stack trace ;) I forked the repo, updated the IPs and submitted a pull request (#12) ;) But until this is done, you can use my fork of the repo https://github.com/LukeLR/telegram-bot which is exactly the same code with the updated IPs ;) This should fix your issue |
Do we need to configure something for the telegram-bot or it should work out-of-the-box ?
I've run the bot on the production or test servers and I get a timeout when it tries to do a rpc call in the login() method
The text was updated successfully, but these errors were encountered: