From 367fcce634aba50a3eeb3af1a54e16d1a3d26ada Mon Sep 17 00:00:00 2001 From: Andrew <159703254+andrewsoonqn@users.noreply.github.com> Date: Wed, 24 Jun 2026 15:31:46 +0800 Subject: [PATCH] Prevent loss of user access code on LAN reselect Keep user access code intact to maintain access rights even if device slot is unpopulated, ensuring continuous connection and status message reception. --- src/slic3r/GUI/GUI_App.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 4c4bdfd62c..03edbb9b39 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -2166,7 +2166,12 @@ void GUI_App::init_networking_callbacks() obj->is_tunnel_mqtt = tunnel; obj->command_request_push_all(true); obj->command_get_version(); - obj->erase_user_access_code(); + // Do NOT erase user code. Erasing will cause has_access_right to be false + // whenever the device slot isn't populated yet (e.g. LAN reselect after logout). + // This filters this printer out of get_my_machine_list, silently dropping every status message + // AND the get_access_code reply that would refill the code, leaving a permanently + // dead "connected but no live data" state. + // obj -> set_user_access_code(""); obj->command_get_access_code(); if (m_agent) m_agent->install_device_cert(obj->get_dev_id(), obj->is_lan_mode_printer());