Attempt a workaround for unicode hostname resolution deadlock in the
analyzer
This commit is contained in:
parent
47a7b0245e
commit
8aaf300491
1 changed files with 6 additions and 0 deletions
|
@ -93,6 +93,12 @@ class CloudStorageUploader:
|
|||
# turning into deadlocks, we explicitly set the global default timeout period here:
|
||||
socket.setdefaulttimeout(SOCKET_TIMEOUT)
|
||||
|
||||
# Crazy workaround for a deadlock inside Python 2.7 where unicode hostname resolution can
|
||||
# cause a deadlock because the import spins up a separate thread:
|
||||
# http://emptysqua.re/blog/weird-green-bug/
|
||||
# https://jira.mongodb.org/browse/PYTHON-607
|
||||
unicode('foo').encode('idna')
|
||||
|
||||
conn = S3Connection(self._api_key, self._api_key_secret, host=self._host)
|
||||
bucket = conn.get_bucket(self._bucket)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue