NEW: auto logout when mqtt return code = 5

Change-Id: I75f7d0939d8483ad612408df9fe817ed652f9634
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2023-05-22 11:33:33 +08:00 committed by Lane.Wei
parent de895e573a
commit c731a1aceb
2 changed files with 12 additions and 2 deletions

View file

@ -1830,10 +1830,20 @@ void GUI_App::init_networking_callbacks()
// GUI::wxGetApp().request_user_handle(online_login);
// });
m_agent->set_on_server_connected_fn([this]() {
m_agent->set_on_server_connected_fn([this](int return_code, int reason_code) {
if (m_is_closing) {
return;
}
if (return_code == 5) {
GUI::wxGetApp().CallAfter([this] {
this->request_user_logout();
MessageDialog msg_dlg(nullptr, _L("Login information expired. Please login again."), "", wxAPPLY | wxOK);
if (msg_dlg.ShowModal() == wxOK) {
return;
}
});
return;
}
GUI::wxGetApp().CallAfter([this] {
if (m_is_closing)
return;

View file

@ -12,4 +12,4 @@ set(BBL_INTERNAL_TESTING "1")
endif()
# The build_version should start from 50 in master branch
set(SLIC3R_VERSION "01.06.05.01")
set(SLIC3R_VERSION "01.06.07.51")