mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX:fixed the issue of using the wrong tunnel after reconnrction
jira:[none] Change-Id: Ief1e79a753b051e859697b523eb1ba230f154ae2 (cherry picked from commit 0d9f48c5aae2c340e8b1c4fadb42c331ae9486f6)
This commit is contained in:
@@ -1683,10 +1683,25 @@ void GUI_App::init_networking_callbacks()
|
|||||||
//subscribe device
|
//subscribe device
|
||||||
if (m_agent->is_user_login()) {
|
if (m_agent->is_user_login()) {
|
||||||
m_agent->start_device_subscribe();
|
m_agent->start_device_subscribe();
|
||||||
|
|
||||||
|
/*disconnect lan*/
|
||||||
|
DeviceManager* dev = this->getDeviceManager();
|
||||||
|
if (!dev) return;
|
||||||
|
|
||||||
|
MachineObject *obj = dev->get_selected_machine();
|
||||||
|
if (!obj) return;
|
||||||
|
|
||||||
|
if (obj->nt_try_local_tunnel && obj->connection_type() == "cloud") {
|
||||||
|
if (obj->is_connected()) {
|
||||||
|
obj->disconnect();
|
||||||
|
}
|
||||||
|
obj->nt_reset_data();
|
||||||
|
}
|
||||||
|
|
||||||
/* resubscribe the cache dev list */
|
/* resubscribe the cache dev list */
|
||||||
if (this->is_enable_multi_machine()) {
|
if (this->is_enable_multi_machine()) {
|
||||||
DeviceManager* dev = this->getDeviceManager();
|
|
||||||
if (dev && !dev->subscribe_list_cache.empty()) {
|
if (!dev->subscribe_list_cache.empty()) {
|
||||||
dev->subscribe_device_list(dev->subscribe_list_cache);
|
dev->subscribe_device_list(dev->subscribe_list_cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user