mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
ee357298c7
commit
5c7c56ac99
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user