propagate ACN status
continuous-integration/drone/pr Build is running Details

This commit is contained in:
Sarah Jamie Lewis 2023-06-13 10:05:47 -07:00
parent 6165b03b75
commit 4713f25755
1 changed files with 6 additions and 3 deletions

View File

@ -417,14 +417,17 @@ func ResetTor() {
currentSettings.CustomSocksPort = settings.CustomSocksPort
currentSettings.CustomTorrc = settings.CustomTorrc
application.UpdateSettings(currentSettings)
globalACN.ReplaceACN(newAcn)
application.QueryACNVersion()
// We need to update settings on reset as buildACN can alter settings, otherwise the next reset will be broken...
settings = application.ReadSettings()
settingsJson, _ := json.Marshal(settings)
application.GetPrimaryBus().Publish(event.NewEvent(UpdateGlobalSettings, map[event.Field]string{event.Data: string(settingsJson)}))
}
}
// replace ACN regardlesss
globalACN.ReplaceACN(newAcn)
application.QueryACNStatus()
application.QueryACNVersion()
log.Infof("Restarted")
}()
}