]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rados: don't close watch in dealloc if already closed 51259/head
authorTim Serong <tserong@suse.com>
Thu, 9 Sep 2021 07:08:24 +0000 (17:08 +1000)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Sat, 14 Oct 2023 08:05:12 +0000 (15:05 +0700)
Fixes: https://tracker.ceph.com/issues/52553
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit d292d01635c203384a9ecb1876e54014b5a8b5c4)

src/pybind/rados/rados.pyx

index 06c4a3547303f5461790400a86b4a9437f15c396..5d1b61536daa41d8e19b033ad761743d7a716ab9 100644 (file)
@@ -2056,6 +2056,8 @@ cdef class Watch(object):
         return False
 
     def __dealloc__(self):
+        if self.id == 0:
+            return
         self.ioctx.rados.require_state("connected")
         self.close()