diff --git a/igniter/tools.py b/igniter/tools.py index 7f5aa8d876..38d7fa2b26 100644 --- a/igniter/tools.py +++ b/igniter/tools.py @@ -131,6 +131,7 @@ def validate_mongo_connection(cnx: str) -> (bool, str): try: client = MongoClient(**mongo_args) client.server_info() + client.close() except ServerSelectionTimeoutError as e: return False, f"Cannot connect to server {cnx} - {e}" except ValueError: