File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1322,6 +1322,10 @@ std::optional<fb2::Future<GenericError>> ServerFamily::Load(const std::string& p
1322
1322
return {};
1323
1323
}
1324
1324
1325
+ // Reset state on error
1326
+ absl::Cleanup reset_state{
1327
+ [this ]() { service_.SwitchState (GlobalState::LOADING, GlobalState::ACTIVE); }};
1328
+
1325
1329
auto & pool = service_.proactor_pool ();
1326
1330
1327
1331
const vector<string>& paths = *expand_result;
@@ -1388,6 +1392,7 @@ std::optional<fb2::Future<GenericError>> ServerFamily::Load(const std::string& p
1388
1392
};
1389
1393
pool.GetNextProactor ()->Dispatch (std::move (load_join_func));
1390
1394
1395
+ std::move (reset_state).Cancel (); // load_join_func resets state after loading
1391
1396
return future;
1392
1397
}
1393
1398
You can’t perform that action at this time.
0 commit comments