Update connectivity. Delay tor connection until the end of setup #29
Loading…
Reference in New Issue
No description provided.
Delete Branch "tor-setup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/autobindings/94
@ -171,1 +169,3 @@
settingsFile.WriteGlobalSettings(globalSettings)
// start with an Error ACN
globalACN = connectivity.NewProxyACN(&connectivity.ErrorACN{})
// settingsFile.WriteGlobalSettings(globalSettings)
delete?
@ -198,0 +197,4 @@
// NOTE: This can block until finishing, so we wrap it in a
// go routine...
go func() {
newACN, globalSettings := buildACN(application.ReadSettings(), globalTorPath, globalAppDir)
we've already loaded settings above and this is operating in a seperate thread. i guess the
globalSettings
will be shaddowed but then theSettingsFile.WriteGlobalSettings(globalSettings)
seems like a bad choice, this isnt the authoritative thread? also what would cause the settings to change here in this much smaller scope? should buildACN no longer return settings since I think that was just historical necesity but then we moved settings into app anyways?@ -198,0 +201,4 @@
settingsFile.WriteGlobalSettings(globalSettings)
globalACN.ReplaceACN(newACN)
application.QueryACNVersion()
// Settings may have changed...
also
application.QueryACNStatus()
probably@ -411,0 +417,4 @@
currentSettings.CustomTorrc = settings.CustomTorrc
application.UpdateSettings(currentSettings)
globalACN.ReplaceACN(newAcn)
application.QueryACNVersion()
pretty sure we still need
application.QueryACNStatus()
as well I think?@ -411,0 +423,4 @@
settings = application.ReadSettings()
settingsJson, _ := json.Marshal(settings)
application.GetPrimaryBus().Publish(event.NewEvent(UpdateGlobalSettings, map[event.Field]string{event.Data: string(settingsJson)}))
}
Can we handle error? can ErrorACN have an alt constructor that takes an error string, so we can create a new one with the error, swap it in, and update status, so user can try hitting reset ACN again possibly?
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/autobindings/97
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/autobindings/98
@ -411,0 +424,4 @@
settings = application.ReadSettings()
settingsJson, _ := json.Marshal(settings)
application.GetPrimaryBus().Publish(event.NewEvent(UpdateGlobalSettings, map[event.Field]string{event.Data: string(settingsJson)}))
}
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/autobindings/99
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/autobindings/101