From: Tim Serong Date: Thu, 9 Sep 2021 07:08:24 +0000 (+1000) Subject: pybind/rados: don't close watch in dealloc if already closed X-Git-Tag: v17.1.0~917^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43107%2Fhead;p=ceph.git pybind/rados: don't close watch in dealloc if already closed Fixes: https://tracker.ceph.com/issues/52553 Signed-off-by: Tim Serong --- diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index 4a5db34951646..8772942e7cab3 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()