Timeout callback of _HTTPConnection instance. Raise a `HTTPTimeoutError` when a timeout occurs. :info string key: More detailed timeout information.
(self, info: Optional[str] = None)
| 480 | return None |
| 481 | |
| 482 | def _on_timeout(self, info: Optional[str] = None) -> None: |
| 483 | """Timeout callback of _HTTPConnection instance. |
| 484 | |
| 485 | Raise a `HTTPTimeoutError` when a timeout occurs. |
| 486 | |
| 487 | :info string key: More detailed timeout information. |
| 488 | """ |
| 489 | self._timeout = None |
| 490 | error_message = "Timeout {0}".format(info) if info else "Timeout" |
| 491 | if self.final_callback is not None: |
| 492 | self._handle_exception( |
| 493 | HTTPTimeoutError, HTTPTimeoutError(error_message), None |
| 494 | ) |
| 495 | |
| 496 | def _remove_timeout(self) -> None: |
| 497 | if self._timeout is not None: |
nothing calls this directly
no test coverage detected