From d52776a7fc81d4706c879f0e8881af9b414b5c78 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 26 Mar 2017 22:50:45 -0700 Subject: [PATCH] tun2: log on no backends --- lib/tun2/server.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tun2/server.go b/lib/tun2/server.go index 45c3eb6..96dc5b4 100644 --- a/lib/tun2/server.go +++ b/lib/tun2/server.go @@ -390,6 +390,13 @@ func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) { } if len(conns) == 0 { + ln.Error(errors.New("no backend connected"), ln.F{ + "action": "no_backend_connected", + "remote": req.RemoteAddr, + "host": req.Host, + "uri": req.RequestURI, + }) + return nil, errors.New("no backend connected") }