mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-03 18:56:15 +00:00
fix(ui): Admin login could hang forever on "Logging in..."
AdminScreen's LOGIN phase had no timeout, unlike its COMMAND phase
(_cmd_deadline_ms). If a login reply never arrived -- most commonly a
saved password gone stale after the remote node's password changed,
silently dropped instead of nacked -- the screen stayed stuck with only
a manual Cancel to escape.
sendRoomLogin() now returns the same est_timeout sendAdminCommand()
already exposes; AdminScreen uses it to arm a deadline (poll(),
mirroring the COMMAND-phase pattern) that forgets the stale password
and returns to the picker on expiry, same as an explicit login
rejection already does.
Same fix as hotfix/admin-login-timeout (23f43cac), split out of this
branch's other in-progress work.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -222,8 +222,7 @@ public:
|
||||
// command source, so this reuses the same sendLogin() the BLE CMD_SEND_LOGIN
|
||||
// path uses; the async result lands in onContactResponse() and is pushed to
|
||||
// the UI via AbstractUITask::onRoomLoginResult().
|
||||
bool sendRoomLogin(const ContactInfo& contact, const char* password) {
|
||||
uint32_t est_timeout;
|
||||
bool sendRoomLogin(const ContactInfo& contact, const char* password, uint32_t& est_timeout) {
|
||||
if (sendLogin(contact, password, est_timeout) == MSG_SEND_FAILED) return false;
|
||||
clearPendingReqs();
|
||||
memcpy(&ui_pending_login, contact.id.pub_key, 4); // match this in onContactResponse()
|
||||
|
||||
Reference in New Issue
Block a user