Called when the other end of the low-level stream is half-closed. If this returns a false value (including None), the transport will close itself. If it returns a true value, closing the transport is up to the protocol.
(self)
| 451 | self._do_shutdown() |
| 452 | |
| 453 | def eof_received(self): |
| 454 | """Called when the other end of the low-level stream |
| 455 | is half-closed. |
| 456 | |
| 457 | If this returns a false value (including None), the transport |
| 458 | will close itself. If it returns a true value, closing the |
| 459 | transport is up to the protocol. |
| 460 | """ |
| 461 | self._eof_received = True |
| 462 | try: |
| 463 | if self._loop.get_debug(): |
| 464 | logger.debug("%r received EOF", self) |
| 465 | |
| 466 | if self._state == SSLProtocolState.DO_HANDSHAKE: |
| 467 | self._on_handshake_complete(ConnectionResetError) |
| 468 | |
| 469 | elif self._state == SSLProtocolState.WRAPPED: |
| 470 | self._set_state(SSLProtocolState.FLUSHING) |
| 471 | if self._app_reading_paused: |
| 472 | return True |
| 473 | else: |
| 474 | self._do_flush() |
| 475 | |
| 476 | elif self._state == SSLProtocolState.FLUSHING: |
| 477 | self._do_write() |
| 478 | self._set_state(SSLProtocolState.SHUTDOWN) |
| 479 | self._do_shutdown() |
| 480 | |
| 481 | elif self._state == SSLProtocolState.SHUTDOWN: |
| 482 | self._do_shutdown() |
| 483 | |
| 484 | except Exception: |
| 485 | self._transport.close() |
| 486 | raise |
| 487 | |
| 488 | def _get_extra_info(self, name, default=None): |
| 489 | if name in self._extra: |
no test coverage detected