FIX: record mqtt if connected with tunnel

Change-Id: I521b16d66e1a38e72b26c8528d17e6384c3a4555
This commit is contained in:
chunmao.guo 2023-05-31 19:50:49 +08:00 committed by Lane.Wei
parent 8a7d3f36a8
commit c5805588ac
2 changed files with 4 additions and 1 deletions

View file

@ -1868,9 +1868,11 @@ void GUI_App::init_networking_callbacks()
GUI::wxGetApp().CallAfter([this, dev_id] {
if (m_is_closing)
return;
bool tunnel = boost::algorithm::starts_with(dev_id, "tunnel/");
/* request_pushing */
MachineObject* obj = m_device_manager->get_my_machine(dev_id);
MachineObject* obj = m_device_manager->get_my_machine(tunnel ? dev_id.substr(7) : dev_id);
if (obj) {
obj->is_tunnel_mqtt = tunnel;
obj->command_request_push_all();
obj->command_get_version();
}