From 38b9be2a9979d70e30820c8ed876d2ab86401745 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Fri, 5 Feb 2016 16:14:39 -0500 Subject: [PATCH] librados_test_stub: protect against notify/unwatch race Signed-off-by: Jason Dillaman --- src/test/librados_test_stub/TestWatchNotify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/librados_test_stub/TestWatchNotify.cc b/src/test/librados_test_stub/TestWatchNotify.cc index 769e00f183d4f..7bd2ef722bbd1 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); -- 2.39.5