| 742 | pass |
| 743 | |
| 744 | def close(self) -> None: |
| 745 | # In case a connection property does not yet exist |
| 746 | # (due to a crash earlier in the Redis() constructor), return |
| 747 | # immediately as there is nothing to clean-up. |
| 748 | if not hasattr(self, "connection"): |
| 749 | return |
| 750 | |
| 751 | conn = self.connection |
| 752 | if conn: |
| 753 | self.connection = None |
| 754 | self.connection_pool.release(conn) |
| 755 | |
| 756 | if self.auto_close_connection_pool: |
| 757 | self.connection_pool.disconnect() |
| 758 | |
| 759 | def _send_command_parse_response(self, conn, command_name, *args, **options): |
| 760 | """ |