Less verbose connection error reporting
- don't print tracebacks on normal (timeout/reset) errors
This commit is contained in:
parent
cff1af1b4f
commit
d8301ff512
|
@ -96,7 +96,8 @@ class sendDataThread(threading.Thread):
|
||||||
select.select([], [self.sslSock], [], 10)
|
select.select([], [self.sslSock], [], 10)
|
||||||
logger.debug('sock.recv retriable SSL error')
|
logger.debug('sock.recv retriable SSL error')
|
||||||
continue
|
continue
|
||||||
raise
|
logger.debug('Connection error (SSL)')
|
||||||
|
return False
|
||||||
except socket.error as e:
|
except socket.error as e:
|
||||||
if e.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \
|
if e.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \
|
||||||
(sys.platform.startswith('win') and \
|
(sys.platform.startswith('win') and \
|
||||||
|
@ -104,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 == errno.EPIPE:
|
if e.errno in (errno.EPIPE, errno.ECONNRESET):
|
||||||
logger.debug('Connection broken')
|
logger.debug('Connection error (EPIPE/ECONNRESET)')
|
||||||
return False
|
return False
|
||||||
raise
|
raise
|
||||||
throttle.SendThrottle().wait(amountSent)
|
throttle.SendThrottle().wait(amountSent)
|
||||||
|
|
Reference in New Issue
Block a user