Skip to content
Browse files

Set 70 second default socket timeout for httplib

  • Loading branch information...
1 parent 906db3e commit 55de90efb3193f2ffbdf66890323161e626edaf3 @mfschwartz mfschwartz committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 boto/connection.py
View
8 boto/connection.py
@@ -523,9 +523,11 @@ def __init__(self, host, aws_access_key_id=None,
# timeouts will only be applied if Python is 2.6 or greater.
self.http_connection_kwargs = {}
if (sys.version_info[0], sys.version_info[1]) >= (2, 6):
- if config.has_option('Boto', 'http_socket_timeout'):
- timeout = config.getint('Boto', 'http_socket_timeout')
- self.http_connection_kwargs['timeout'] = timeout
+ # If timeout isn't defined in boto config file, use 70 second
+ # default as recommended by
+ # http://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForActivityTask.html
+ self.http_connection_kwargs['timeout'] = config.getint(
+ 'Boto', 'http_socket_timeout', 70)
if isinstance(provider, Provider):
# Allow overriding Provider

0 comments on commit 55de90e

Please sign in to comment.
Something went wrong with that request. Please try again.