I think we got away with this when Client::init was
re-initialising the MonClient, but now that (bogus)
stuff isn't happening any more as Client doesn't
init/teardown monc/objecter itself.
Signed-off-by: John Spray <john.spray@redhat.com>
Mutex::Locker l(lock);
finisher.queue(new FunctionContext([&](int) {
+ monc->sub_unwant("log-info");
+ monc->sub_unwant("mgrdigest");
+ monc->sub_unwant("fsmap");
// First stop the server so that we're not taking any more incoming
// requests
server.shutdown();
// after the messenger is stopped, signal modules to shutdown via finisher
py_modules.shutdown();
}));
+
// Then stop the finisher to ensure its enqueued contexts aren't going
// to touch references to the things we're about to tear down
finisher.wait_for_empty();