Set SSL socket to blocking

- otherwise the error handling gets too complicated
This commit is contained in:
Peter Šurda 2017-02-07 16:42:02 +01:00
parent 6b65dfeeec
commit 8515f9a9fc
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -318,6 +318,8 @@ class receiveDataThread(threading.Thread):
logger.error("SSL socket handhake failed, shutting down connection", exc_info=True)
self.sendDataThreadQueue.put((0, 'shutdown','tls handshake fail'))
return
# SSL in the background should be blocking, otherwise the error handling is difficult
self.sslSock.settimeout(None)
# Command the corresponding sendDataThread to set its own connectionIsOrWasFullyEstablished variable to True also
self.sendDataThreadQueue.put((0, 'connectionIsOrWasFullyEstablished', (self.services, self.sslSock)))