FIX:fixed Lan mode printer will disconnection after connection

Change-Id: Ifa81f35f4d4f58626fc74f9d092a8a1b4d10fb0d
This commit is contained in:
tao wang 2023-03-01 12:27:41 +08:00 committed by Lane.Wei
parent 65e03a5b29
commit 9420de5931

View file

@ -3966,6 +3966,8 @@ bool DeviceManager::set_selected_machine(std::string dev_id)
auto last_selected = my_machine_list.find(selected_machine);
if (last_selected != my_machine_list.end()) {
if (last_selected->second->connection_type() == "lan") {
if (last_selected->second->is_connecting())
return false;
m_agent->disconnect_printer();
}
}