Only call database.connect() if database.is_closed() Prevents errors if _db_connect is triggered twice