File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -217,8 +217,8 @@ class Network {
217217 std::unordered_map<std::string, std::pair<swarm_id_t , std::vector<service_node>>> swarm_cache;
218218
219219 // Snode refresh state
220- int snode_cache_refresh_failure_count;
221- int in_progress_snode_cache_refresh_count;
220+ int snode_cache_refresh_failure_count = 0 ;
221+ int in_progress_snode_cache_refresh_count = 0 ;
222222 std::optional<std::string> current_snode_cache_refresh_request_id;
223223 std::vector<std::function<void ()>> after_snode_cache_refresh;
224224 std::optional<std::vector<service_node>> unused_snode_refresh_nodes;
Original file line number Diff line number Diff line change @@ -1207,6 +1207,8 @@ void Network::refresh_snode_cache(std::optional<std::string> existing_request_id
12071207 // `snode_refresh_results` so we can use it to track the results from the different requests)
12081208 if (!current_snode_cache_refresh_request_id) {
12091209 log::info (cat, " Refreshing snode cache ({})." , request_id);
1210+ snode_cache_refresh_failure_count = 0 ;
1211+ in_progress_snode_cache_refresh_count = 0 ;
12101212 current_snode_cache_refresh_request_id = request_id;
12111213 snode_refresh_results = std::make_shared<std::vector<std::vector<service_node>>>();
12121214 }
@@ -1286,7 +1288,7 @@ void Network::refresh_snode_cache(std::optional<std::string> existing_request_id
12861288 log::error (
12871289 cat,
12881290 " Failed to retrieve nodes from one target when refreshing cache due to "
1289- " error: {} Will try another target after {}ms ({})." ,
1291+ " error: {}, Will try another target after {}ms ({})." ,
12901292 e.what (),
12911293 cache_refresh_retry_delay.count (),
12921294 request_id);
You can’t perform that action at this time.
0 commit comments