(self)
| 1601 | self._protocol = None |
| 1602 | |
| 1603 | def _cleanup(self): |
| 1604 | self._call_termination_listeners() |
| 1605 | # Free the resources associated with this connection. |
| 1606 | # This must be called when a connection is terminated. |
| 1607 | |
| 1608 | if self._pool_holder is not None: |
| 1609 | # Idle connections have no proxy, but still belong to a holder. |
| 1610 | holder, self._pool_holder = self._pool_holder(), None |
| 1611 | if holder is not None and holder._con is self: |
| 1612 | holder._release_on_close() |
| 1613 | |
| 1614 | self._mark_stmts_as_closed() |
| 1615 | self._listeners.clear() |
| 1616 | self._log_listeners.clear() |
| 1617 | self._query_loggers.clear() |
| 1618 | self._clean_tasks() |
| 1619 | |
| 1620 | def _clean_tasks(self): |
| 1621 | # Wrap-up any remaining tasks associated with this connection. |
no test coverage detected