From: Jason Dillaman Date: Fri, 5 Feb 2016 21:14:39 +0000 (-0500) Subject: librados_test_stub: protect against notify/unwatch race X-Git-Tag: v10.0.4~27^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=38b9be2a9979d70e30820c8ed876d2ab86401745;p=ceph.git librados_test_stub: protect against notify/unwatch race Signed-off-by: Jason Dillaman --- diff --git a/src/test/librados_test_stub/TestWatchNotify.cc b/src/test/librados_test_stub/TestWatchNotify.cc index 769e00f183d4..7bd2ef722bbd 100644 --- a/src/test/librados_test_stub/TestWatchNotify.cc +++ b/src/test/librados_test_stub/TestWatchNotify.cc @@ -152,7 +152,7 @@ void TestWatchNotify::execute_notify(const std::string &oid, // client disconnected before notification processed notify_handle->pending_watcher_ids.erase(watcher_id); } else { - WatchHandle &watch_handle = w_it->second; + WatchHandle watch_handle = w_it->second; assert(watch_handle.gid == watcher_id.first); assert(watch_handle.handle == watcher_id.second);