mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
fixes an issue that devmgr ping cloud server every second
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -340,9 +340,17 @@ bool NetworkAgent::is_server_connected(const std::string& provider)
|
||||
return false;
|
||||
}
|
||||
|
||||
int NetworkAgent::refresh_connection()
|
||||
int NetworkAgent::refresh_connection(const std::string& provider)
|
||||
{
|
||||
return invoke_on_all_cloud_agents(m_cloud_agents, [](ICloudServiceAgent& cloud_agent) { return cloud_agent.refresh_connection(); });
|
||||
if(provider.empty())
|
||||
return invoke_on_all_cloud_agents(m_cloud_agents, [](ICloudServiceAgent& cloud_agent) { return cloud_agent.refresh_connection(); });
|
||||
else {
|
||||
const auto cloud_agent = get_cloud_agent(provider);
|
||||
if (cloud_agent)
|
||||
return cloud_agent->refresh_connection();
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void NetworkAgent::enable_multi_machine(bool enable, const std::string& provider)
|
||||
|
||||
Reference in New Issue
Block a user