FIX: check bind status in update timer

Change-Id: I2079e1ef96cdffa0a9776b72942fd45ec88be10b
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2022-08-31 10:25:01 +08:00 committed by Lane.Wei
parent 79944bd0fc
commit bb1be58815

View file

@ -371,6 +371,15 @@ void MonitorPanel::update_all()
return; return;
obj = dev->get_selected_machine(); obj = dev->get_selected_machine();
// check valid machine
if (obj && dev->get_my_machine(obj->dev_id) == nullptr) {
dev->set_selected_machine("");
if (m_agent)
m_agent->set_user_selected_machine("");
show_status((int)MONITOR_NO_PRINTER);
return;
}
//BBS check mqtt connections if user is login //BBS check mqtt connections if user is login
if (wxGetApp().is_user_login()) { if (wxGetApp().is_user_login()) {
// check mqtt connection and reconnect if disconnected // check mqtt connection and reconnect if disconnected