Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole00 committed May 24, 2024
1 parent 222da73 commit 8969e7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion nebula3/gclient/net/Session.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def release(self):
return
self._connection.signout(self._session_id)
self._connection.is_used = False
self._connection.close()
self._connection = None

def ping(self):
Expand Down
2 changes: 2 additions & 0 deletions nebula3/gclient/net/SessionPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,11 @@ def _new_session(self):
resp = session.execute("USE {}".format(self._space_name))
except Exception:
session.release()
connection.close()
raise
if not resp.is_succeeded():
session.release()
connection.close()
raise RuntimeError(
"Failed to get session, cannot set the session space to {} error: {} {}".format(
self._space_name, resp.error_code(), resp.error_msg()
Expand Down

0 comments on commit 8969e7b

Please sign in to comment.