From a43efc8a5a69eb73d4c68f149dad8564710b517a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Jun 2017 11:42:35 +0530 Subject: [PATCH] ... --- src/calibre/srv/loop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/loop.py b/src/calibre/srv/loop.py index f072db046c..5ec9d75563 100644 --- a/src/calibre/srv/loop.py +++ b/src/calibre/srv/loop.py @@ -355,7 +355,7 @@ class ServerLoop(object): def on_ssl_servername(self, socket, server_name, ssl_context): c = self.connection_map.get(socket.fileno()) - if c.ssl_handshake_done: + if getattr(c, 'ssl_handshake_done', False): # We do not allow client initiated SSL renegotiation return ssl.ALERT_DESCRIPTION_NO_RENEGOTIATION