(self)
| 288 | self._inactive_callback = None |
| 289 | |
| 290 | def _deactivate_inactive_connection(self) -> None: |
| 291 | if self._in_use is not None: |
| 292 | raise exceptions.InternalClientError( |
| 293 | 'attempting to deactivate an acquired connection') |
| 294 | |
| 295 | if self._con is not None: |
| 296 | # The connection is idle and not in use, so it's fine to |
| 297 | # use terminate() instead of close(). |
| 298 | self._con.terminate() |
| 299 | # Must call clear_connection, because _deactivate_connection |
| 300 | # is called when the connection is *not* checked out, and |
| 301 | # so terminate() above will not call the below. |
| 302 | self._release_on_close() |
| 303 | |
| 304 | def _release_on_close(self) -> None: |
| 305 | self._maybe_cancel_inactive_callback() |
nothing calls this directly
no test coverage detected