summaryrefslogtreecommitdiffstats
path: root/src/pybind
diff options
context:
space:
mode:
authorTim Serong <tserong@suse.com>2021-09-09 09:08:24 +0200
committerTim Serong <tserong@suse.com>2021-09-09 09:08:27 +0200
commitd292d01635c203384a9ecb1876e54014b5a8b5c4 (patch)
tree73b5e527ec1f3f91d54bd4d2b2ebf04457c97413 /src/pybind
parentMerge pull request #41803 from xxhdx1985126/wip-extent-placement-manager-2 (diff)
downloadceph-d292d01635c203384a9ecb1876e54014b5a8b5c4.tar.xz
ceph-d292d01635c203384a9ecb1876e54014b5a8b5c4.zip
pybind/rados: don't close watch in dealloc if already closed
Fixes: https://tracker.ceph.com/issues/52553 Signed-off-by: Tim Serong <tserong@suse.com>
Diffstat (limited to 'src/pybind')
-rw-r--r--src/pybind/rados/rados.pyx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx
index 4a5db349516..8772942e7ca 100644
--- a/src/pybind/rados/rados.pyx
+++ b/src/pybind/rados/rados.pyx
@@ -2025,6 +2025,8 @@ cdef class Watch(object):
return False
def __dealloc__(self):
+ if self.id == 0:
+ return
self.ioctx.rados.require_state("connected")
self.close()