Isolate background plugin initialization
Summary: Background plugins are initialised when flipper connects. But there's no isolation, so if any fail to initialize, then we don't carry on initializing the rest. This fixes that by skipping failed ones only. Reviewed By: passy Differential Revision: D17600854 fbshipit-source-id: 2ef04cbcecda78ca448c2f4d56639ba63792e2f7
This commit is contained in:
committed by
Facebook Github Bot
parent
c907e53189
commit
f72e6e0f5e
@@ -102,9 +102,15 @@ void FlipperClient::startBackgroundPlugins() {
|
||||
++it) {
|
||||
std::cout << it->first << std::endl;
|
||||
if (it->second.get()->runInBackground()) {
|
||||
try {
|
||||
auto& conn = connections_[it->first];
|
||||
conn = std::make_shared<FlipperConnectionImpl>(socket_.get(), it->first);
|
||||
conn =
|
||||
std::make_shared<FlipperConnectionImpl>(socket_.get(), it->first);
|
||||
it->second.get()->didConnect(conn);
|
||||
} catch (std::exception& e) {
|
||||
log("Exception starting background plugin: " + it->first + ". " +
|
||||
e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user