Skip to content

Commit

Permalink
pybind/rados: don't close watch in dealloc if already closed
Browse files Browse the repository at this point in the history
Fixes: https://tracker.ceph.com/issues/52553
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit d292d01)
  • Loading branch information
tserong authored and k0ste committed Jul 18, 2023
1 parent 014f9fb commit b1a1f24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pybind/rados/rados.pyx
Expand Up @@ -2047,6 +2047,8 @@ cdef class Watch(object):
return False

def __dealloc__(self):
if self.id == 0:
return
self.ioctx.rados.require_state("connected")
self.close()

Expand Down

0 comments on commit b1a1f24

Please sign in to comment.