Skip to content

Commit

Permalink
Less verbose SSL handshake reporting
Browse files Browse the repository at this point in the history
- if SSL handshake fails, we don't need to stack trace because we know
  where it's happening. Only report the error string.
  • Loading branch information
PeterSurda committed Jan 19, 2017
1 parent 5828021 commit 01a9124
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/class_receiveDataThread.py
Expand Up @@ -271,6 +271,10 @@ def connectionFullyEstablished(self):
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))))
return
except:
logger.error("SSL socket handhake failed, shutting down connection", exc_info=True)
self.sendDataThreadQueue.put((0, 'shutdown','tls handshake fail'))
Expand Down

0 comments on commit 01a9124

Please sign in to comment.