vesoft-inc / nebula-python

Client API of Nebula Graph in Python
194 stars 76 forks source link

connection is None in _remove_idle_unusable_session after session.close() #249

Closed liuxiaocs7 closed 1 year ago

liuxiaocs7 commented 1 year ago

I have implement session pool feature to 2.6 refer to the session pool implementation in the master branch (#246), and i find the sessionpool may have the same issue.

after session.release(), session.connection is None, so session._connection.close() will raise an error

https://github.com/vesoft-inc/nebula-python/blob/f028dfc68a01d6985c448cbb8c04e9c2b4b247f3/nebula3/gclient/net/SessionPool.py#L458-L461

https://github.com/vesoft-inc/nebula-python/blob/f028dfc68a01d6985c448cbb8c04e9c2b4b247f3/nebula3/gclient/net/Session.py#L228-L237