@@ -56,10 +56,8 @@ func newDirector(urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterv
plog.Infof("endpoints found %q", sl)
})
}
- select {
- case <-time.After(ri):
- d.refresh()
- }
+ time.Sleep(ri)
+ d.refresh()
}()
return d
@@ -63,6 +63,7 @@ type reverseProxy struct {
func (p *reverseProxy) ServeHTTP(rw http.ResponseWriter, clientreq *http.Request) {
+ reportIncomingRequest(clientreq)
proxyreq := new(http.Request)
*proxyreq = *clientreq
startTime := time.Now()