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

Provide timeout for flickr REST calls #27

Closed
sybrenstuvel opened this Issue Jun 5, 2013 · 2 comments

Comments

Projects
None yet
1 participant
@sybrenstuvel
Copy link
Owner

sybrenstuvel commented Jun 5, 2013

Originally reported by: Domen Kožar (Bitbucket: iElectric, GitHub: Unknown)


In case the website is down, it would be wise to set timeout to 3 seconds or similar


@sybrenstuvel

This comment has been minimized.

Copy link
Owner Author

sybrenstuvel commented Jun 5, 2013

Original comment by Sybren Stüvel (Bitbucket: sybren, GitHub: sybren):


This is a good idea.

In the mean time, you can use http://docs.python.org/3/library/socket.html#socket.setdefaulttimeout to simply set a default timeout before performing your FlickrAPI call.

@sybrenstuvel

This comment has been minimized.

Copy link
Owner Author

sybrenstuvel commented Jun 5, 2013

Original comment by Domen Kožar (Bitbucket: iElectric, GitHub: Unknown):


socket.setdefaulttimeout changes global state, which can lead to unexpected problems, but for now it will do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment