From f9ab9a4faeda0f7a5f22da3eddf4bebd0173e64d Mon Sep 17 00:00:00 2001 From: ghjhhyuyuy <798389920@qq.com> Date: Mon, 12 Aug 2024 09:46:40 +0800 Subject: [PATCH] fix connection not release bug (#353) * fix connection not release bug * Address Nicole00's comment as agreed in review --------- Co-authored-by: Wey Gu --- nebula3/gclient/net/Connection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nebula3/gclient/net/Connection.py b/nebula3/gclient/net/Connection.py index a8eaa8e8..897bb334 100644 --- a/nebula3/gclient/net/Connection.py +++ b/nebula3/gclient/net/Connection.py @@ -171,6 +171,7 @@ def authenticate(self, user_name, password): try: resp = self._connection.authenticate(user_name, password) if resp.error_code != ErrorCode.SUCCEEDED: + self._connection.is_used = False raise AuthFailedException(resp.error_msg) return AuthResult( resp.session_id, resp.time_zone_offset_seconds, resp.time_zone_name