+ # Do the secret SSL handshake
+ if self.using_ssl:
+ self.sock.set_connect_state() # pylint: disable-msg=E1103
+ try:
+ http.Handshake(self.sock, self.WRITE_TIMEOUT)
+ except http.HttpSessionHandshakeUnexpectedEOF:
+ raise http.HttpError("Server closed connection during SSL handshake")
+