tun2: no connections means no connections

This commit is contained in:
Cadey Ratio 2017-03-26 22:00:47 -07:00
parent 2f08c381e7
commit aa16ea5e26
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) {
val, ok := s.domains.Get(req.Host) val, ok := s.domains.Get(req.Host)
if ok { if ok {
conns, ok = val.([]*Connection) conns, ok = val.([]*Connection)
if !ok { if !ok || len(conns) == 0 {
ln.Error(errors.New("no backend connected"), ln.F{ ln.Error(errors.New("no backend connected"), ln.F{
"action": "no_backend_connected", "action": "no_backend_connected",
"remote": req.RemoteAddr, "remote": req.RemoteAddr,