mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
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:
parent
de895e573a
commit
c731a1aceb
2 changed files with 12 additions and 2 deletions
|
@ -1830,8 +1830,18 @@ void GUI_App::init_networking_callbacks()
|
||||||
// GUI::wxGetApp().request_user_handle(online_login);
|
// 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) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
GUI::wxGetApp().CallAfter([this] {
|
GUI::wxGetApp().CallAfter([this] {
|
||||||
|
|
|
@ -12,4 +12,4 @@ set(BBL_INTERNAL_TESTING "1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The build_version should start from 50 in master branch
|
# The build_version should start from 50 in master branch
|
||||||
set(SLIC3R_VERSION "01.06.05.01")
|
set(SLIC3R_VERSION "01.06.07.51")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue