diff options
author | 2017-09-02 18:43:52 +0200 | |
---|---|---|
committer | 2017-09-02 18:43:52 +0200 | |
commit | 9bcddc5c16f39a03408675b8c271138a757c94b6 (patch) | |
tree | 6a836a990924ede75cb23a72aaaba85535e49275 /middleware/proxy/setup.go | |
parent | 3a96d1ab778417d2dc5384de8d3547674d77e6cc (diff) | |
download | coredns-9bcddc5c16f39a03408675b8c271138a757c94b6.tar.gz coredns-9bcddc5c16f39a03408675b8c271138a757c94b6.tar.zst coredns-9bcddc5c16f39a03408675b8c271138a757c94b6.zip |
mw/proxy: simplify google code (#1019)
* mw/proxy: simplify google code
Minimize bootstrap code a bit, and block on the first resolve of the
google https endpont. Add more logging and include actual error in the
returned errors.
Also re-resolve every 120 seconds, instead of 300 (might eventually make
this an option).
* fix test
Diffstat (limited to 'middleware/proxy/setup.go')
-rw-r--r-- | middleware/proxy/setup.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/middleware/proxy/setup.go b/middleware/proxy/setup.go index 544633722..d55065734 100644 --- a/middleware/proxy/setup.go +++ b/middleware/proxy/setup.go @@ -30,7 +30,8 @@ func setup(c *caddy.Controller) error { c.OnStartup(OnStartupMetrics) - for _, u := range upstreams { + for i := range upstreams { + u := upstreams[i] c.OnStartup(func() error { return u.Exchanger().OnStartup(P) }) |