diff --git a/src/data_agent/connection_manager.py b/src/data_agent/connection_manager.py index c3f249f..e4c92ad 100644 --- a/src/data_agent/connection_manager.py +++ b/src/data_agent/connection_manager.py @@ -82,10 +82,15 @@ def __del__(self): self.close() def close(self): + if not self._connector_classes: + return + # Remove connections, but not from persistance existing_connections = list(self._connections_map.keys()) for conn in existing_connections: self._delete_connection(conn) + + self._connector_classes = None log.info("ConnectionManager terminated successfully.") def reset(self):