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

Add a socketTimeout option to timeout http requests #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucdew
Copy link

@lucdew lucdew commented Apr 14, 2018

Add an option named socketTimeout for polling to set a socket read timeout for http requests to telegram. The default value is set to 30 seconds.
Otherwise there is no socket read timeout and connection can hang indefinitely on some systems.

@lucdew
Copy link
Author

lucdew commented Apr 16, 2018

Well I just realized looking at the telegram API that the getUpdates is a long polling request, so the default value is not good and should probably be 0 ( no timeout). However I still think that it is more reliable to have the connection timeout. Also when the socket timeout value is set, it should be checked to be greater than the getUpdates timeout.

mrummuka pushed a commit to mrummuka/telebot that referenced this pull request Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant