]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: clear realm watch on failed watch_restart 10446/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 26 Jul 2016 16:50:13 +0000 (12:50 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 26 Jul 2016 16:50:15 +0000 (12:50 -0400)
commite5b8b5b27502fdacdac38effd7a55fd719911e85
tree73fd47b3a34de20c19df03ad6d612657e06d91a7
parent4c4e0bc34341b029eed8da9488d7d4ed58dd03cb
rgw: clear realm watch on failed watch_restart

if the realm is deleted while the gateway has a watch, it's disconnected
and watch_restart() will fail. this results in a watch handle of 0,
which leads to a segfault on ~RGWRealmWatcher when we pass it to
unwatch()

this commit cleans up the watch when watch_restart() fails, so we don't
try to unwatch() on destruction

Fixes: http://tracker.ceph.com/issues/16817
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_realm_watcher.cc