(self)
| 554 | return [("/", ConnectionCloseHandler, dict(test=self))] |
| 555 | |
| 556 | def test_connection_close(self): |
| 557 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) |
| 558 | s.connect(("127.0.0.1", self.get_http_port())) |
| 559 | self.stream = IOStream(s) |
| 560 | self.stream.write(b"GET / HTTP/1.0\r\n\r\n") |
| 561 | self.wait() |
| 562 | # Let the hanging coroutine clean up after itself |
| 563 | self.cleanup_event.set() |
| 564 | self.io_loop.run_sync(lambda: gen.sleep(0)) |
| 565 | |
| 566 | def on_handler_waiting(self): |
| 567 | logging.debug("handler waiting") |