summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rwxr-xr-xmain.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index c57ad7a..7a5a63e 100755
--- a/main.go
+++ b/main.go
@@ -11,7 +11,6 @@ import (
func main() {
app.Release.Version = "1.3.2"
app.Release.Description = "Two API endpoints and template embedding into binary"
- go app.RefreshInstances()
app.ExecuteCommandLineArguments()
app.ExecuteConfig()
@@ -21,6 +20,11 @@ func main() {
// can't exhaust the process or get our egress IP banned by CloudFront/WAF.
app.InstallDAThrottle()
+ // Only once the config is loaded and the throttle installed: this fetches over
+ // the network, so starting it earlier both raced ExecuteConfig's writes to CFG
+ // and let the request escape the throttle and the configured User-Agent.
+ go app.RefreshInstances()
+
go func() {
for {
err := devianter.UpdateCSRF()