Less verbose SSL handshake reporting

- if SSL handshake fails, we don't need to stack trace because we know
  where it's happening. Only report the error string.
This commit is contained in:
Peter Šurda 2017-01-19 19:52:54 +01:00
parent 5828021903
commit 01a9124b7d
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 4 additions and 0 deletions

View File

@ -271,6 +271,10 @@ class receiveDataThread(threading.Thread):
except ssl.SSLWantWriteError:
logger.debug("Waiting for SSL socket handhake write")
select.select([], [self.sslSock], [], 10)
except ssl.SSLError as e:
logger.error("SSL socket handhake failed: %s, shutting down connection", str(e))
self.sendDataThreadQueue.put((0, 'shutdown','tls handshake fail %s' % (str(e))))
logger.error("SSL socket handhake failed, shutting down connection", exc_info=True)
self.sendDataThreadQueue.put((0, 'shutdown','tls handshake fail'))