]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados_test_stub: protect against notify/unwatch race 7540/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 5 Feb 2016 21:14:39 +0000 (16:14 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 5 Feb 2016 21:14:39 +0000 (16:14 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librados_test_stub/TestWatchNotify.cc

index 769e00f183d4f7e11db56543159c6fb5bbf2a489..7bd2ef722bbd10ae6d81efb194b882310c4cd67e 100644 (file)
@@ -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);