socket.error is now caught in perform_request aswell.

Fixes #205
This commit is contained in:
Sven Wästlund
2015-03-11 16:17:10 +01:00
parent b92d591026
commit 3616f7208a
+2 -1
View File
@@ -1,5 +1,6 @@
from __future__ import absolute_import
from socket import timeout as SocketTimeout
from socket import error as SocketError
import time
import logging
@@ -69,7 +70,7 @@ class ThriftConnection(PoolingConnection):
except SocketTimeout as e:
self.log_request_fail(method, url, body, time.time() - start, exception=e)
raise ConnectionTimeout('TIMEOUT', str(e), e)
except (TException, SocketTimeout) as e:
except (TException, SocketError) as e:
self.log_request_fail(method, url, body, time.time() - start, exception=e)
if tclient:
try: