mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
proxy: simplify channel receive, add missing function call
This commit is contained in:
parent
ee4ff1e448
commit
6abbdcdc06
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user