(self)
| 336 | self._close_callback = callback |
| 337 | |
| 338 | def _on_connection_close(self) -> None: |
| 339 | # Note that this callback is only registered on the IOStream |
| 340 | # when we have finished reading the request and are waiting for |
| 341 | # the application to produce its response. |
| 342 | if self._close_callback is not None: |
| 343 | callback = self._close_callback |
| 344 | self._close_callback = None |
| 345 | callback() |
| 346 | if not self._finish_future.done(): |
| 347 | future_set_result_unless_cancelled(self._finish_future, None) |
| 348 | self._clear_callbacks() |
| 349 | |
| 350 | def close(self) -> None: |
| 351 | if self.stream is not None: |
nothing calls this directly
no test coverage detected