update UpdateURL() to delete server session when connection failed

This commit is contained in:
Charles Ewert 2023-06-01 23:21:42 -04:00
parent 94bcf10231
commit ff8e7c3471
2 changed files with 7 additions and 2 deletions

View File

@ -8,7 +8,6 @@ function LoginFlow(startOver = false as boolean)
startOver = not session.server.UpdateURL(serverUrl)
if startOver
print "Could not connect to previously saved server."
session.server.Delete()
end if
else
startOver = true

View File

@ -64,7 +64,13 @@ namespace session
' validate parameters
if value = "" then return false
session.server.Update("url", value)
return session.server.Populate()
success = session.server.Populate()
if not success
session.server.Delete()
end if
return success
end function
' Use the saved server url to populate the global server session array (m.global.session.server)