self._handshake_writing = False
self._ssl_connect_callback = None
self._server_hostname = None
+ self._initiate_handshake()
+
+ def _initiate_handshake(self):
+ self._add_io_state(self.io_loop.READ | self.io_loop.WRITE)
def reading(self):
return self._handshake_reading or super(SSLIOStream, self).reading()
def accept_callback(connection, address):
streams[0] = self._make_server_iostream(connection, **kwargs)
- if isinstance(streams[0], SSLIOStream):
- # HACK: The SSL handshake won't complete (and
- # therefore the client connect callback won't be
- # run)until the server side has tried to do something
- # with the connection. For these tests we want both
- # sides to connect before we do anything else with the
- # connection, so we must cause some dummy activity on the
- # server. If this turns out to be useful for real apps
- # it should have a cleaner interface.
- streams[0]._add_io_state(IOLoop.READ)
self.stop()
def connect_callback():