android-notify stop login attempter if coreReady

In case the login was made manually by the user via the grafical
interface when the autologin managaer has already started but not logged
in yet, the password attempt timer was looping to infinite causing
unnecessary load and log spamming, this commit attempt to prevent that
from happening
This commit is contained in:
Gioacchino Mazzurco 2017-07-14 12:16:18 +02:00
parent ee357298c7
commit 5c7c56ac99

View File

@ -58,7 +58,11 @@ QtObject
var runState = jsonReponse.data.runstate
if(typeof(runState) !== 'string')
{
console.log("runStateCallback(par)", "Core hanged!", par.response)
coreReady = false
console.log("runStateCallback(par)",
"Core hanged!",
"typeof(runState):", typeof(runState),
"par.response:", par.response)
return
}
@ -70,7 +74,7 @@ QtObject
break
case "fatal_error":
coreReady = false
console.log("Core hanged")
console.log("Core hanged! runState:", runState)
break
case "waiting_account_select":
coreReady = false
@ -145,7 +149,11 @@ QtObject
interval: 700
repeat: true
triggeredOnStart: true
onTriggered: rsApi.request("/control/password/", "", attemptPasswordCB)
onTriggered:
{
if(am.coreReady) attemptPasswordCBCB()
else rsApi.request("/control/password/", "", attemptPasswordCB)
}
function attemptPasswordCB(par)
{