CloudFlare will break 502 error

This commit is contained in:
Star Brilliant
2017-11-30 19:08:22 +08:00
parent 32e3cfa636
commit e510d84809

View File

@@ -205,7 +205,7 @@ func (s *Server) handlerFunc(w http.ResponseWriter, r *http.Request) {
resp, err := s.doDNSQuery(msg)
if err != nil {
jsonDNS.FormatError(w, fmt.Sprintf("DNS query failure (%s)", err.Error()), 502)
jsonDNS.FormatError(w, fmt.Sprintf("DNS query failure (%s)", err.Error()), 503)
return
}
respJson := jsonDNS.Marshal(resp)