ignore exceptions when trying to close transport socket
This commit is contained in:
@@ -66,7 +66,11 @@ class ThriftConnection(PoolingConnection):
|
|||||||
except (TException, SocketTimeout) as e:
|
except (TException, SocketTimeout) as e:
|
||||||
self.log_request_fail(method, url, body, time.time() - start, exception=e)
|
self.log_request_fail(method, url, body, time.time() - start, exception=e)
|
||||||
if tclient:
|
if tclient:
|
||||||
|
try:
|
||||||
|
# try closing transport socket
|
||||||
tclient.transport.close()
|
tclient.transport.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
raise ConnectionError('N/A', str(e), e)
|
raise ConnectionError('N/A', str(e), e)
|
||||||
|
|
||||||
self._release_connection(tclient)
|
self._release_connection(tclient)
|
||||||
|
|||||||
Reference in New Issue
Block a user