If you run MDSDaemon::init(), an exception occurs that causes MDSDaemon::suicide()--->Beacon::shutdown()--->sender.join();
this problem occurs because sender is just Default-constructed is in Beacon.h(std::thread sender;), there is no call
to Beacon::init() to construct the sender, so the sender has no "joinable"
Fixes: http://tracker.ceph.com/issues/38822
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
if (!finished) {
finished = true;
lock.unlock();
- sender.join();
+ if (sender.joinable())
+ sender.join();
}
}