Less verbose error handling
- if socket sending results in EHOSTUNREACH or ETIMEDOUT, don't show backtrace
This commit is contained in:
parent
8579d8b3b5
commit
124b321b8c
|
@ -105,8 +105,8 @@ class sendDataThread(threading.Thread):
|
||||||
select.select([], [self.sslSock if isSSL else self.sock], [], 10)
|
select.select([], [self.sslSock if isSSL else self.sock], [], 10)
|
||||||
logger.debug('sock.recv retriable error')
|
logger.debug('sock.recv retriable error')
|
||||||
continue
|
continue
|
||||||
if e.errno in (errno.EPIPE, errno.ECONNRESET):
|
if e.errno in (errno.EPIPE, errno.ECONNRESET, errno.EHOSTUNREACH, errno.ETIMEDOUT):
|
||||||
logger.debug('Connection error (EPIPE/ECONNRESET)')
|
logger.debug('Connection error (EPIPE/ECONNRESET/EHOSTUNREACH/ETIMEDOUT)')
|
||||||
return False
|
return False
|
||||||
raise
|
raise
|
||||||
throttle.SendThrottle().wait(amountSent)
|
throttle.SendThrottle().wait(amountSent)
|
||||||
|
|
Reference in New Issue
Block a user