diff options
author | Tim Serong <tserong@suse.com> | 2021-09-09 09:08:24 +0200 |
---|---|---|
committer | Tim Serong <tserong@suse.com> | 2021-09-09 09:08:27 +0200 |
commit | d292d01635c203384a9ecb1876e54014b5a8b5c4 (patch) | |
tree | 73b5e527ec1f3f91d54bd4d2b2ebf04457c97413 /src/pybind/rados/rados.pyx | |
parent | Merge pull request #41803 from xxhdx1985126/wip-extent-placement-manager-2 (diff) | |
download | ceph-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/rados/rados.pyx')
-rw-r--r-- | src/pybind/rados/rados.pyx | 2 |
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() |