watcher->reinit();
}
};
+ shared_ptr<C_ReinitWatch> reinit_watch;
public:
RGWWatcher(RGWRados *r, int i, const string& o) : rados(r), index(i), oid(o), watch_handle(0) {}
void handle_notify(uint64_t notify_id,
lderr(rados->ctx()) << "RGWWatcher::handle_error cookie " << cookie
<< " err " << cpp_strerror(err) << dendl;
rados->remove_watcher(index);
- rados->schedule_context(new C_ReinitWatch(this));
+ reinit_watch.reset(new C_ReinitWatch(this));
+ rados->schedule_context(reinit_watch.get());
}
void reinit() {