Log upstream server errors
This commit is contained in:
parent
c14e26769f
commit
a2d9a64bed
@ -287,8 +287,13 @@ func (s *Server) connect(upstream *Upstream) error {
|
||||
|
||||
func (s *Server) Run() {
|
||||
for i := range s.Upstreams {
|
||||
upstream := &s.Upstreams[i]
|
||||
// TODO: retry connecting
|
||||
go s.connect(&s.Upstreams[i])
|
||||
go func() {
|
||||
if err := s.connect(upstream); err != nil {
|
||||
s.Logger.Printf("Failed to connect to upstream server %q: %v", upstream.Addr, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user