mirror of https://github.com/status-im/consul.git
fix refactoring
This commit is contained in:
parent
8e16bd7d77
commit
5f38e1148a
|
@ -607,7 +607,8 @@ func (a *Agent) reloadWatches(cfg *config.RuntimeConfig) error {
|
|||
if raw, ok := args.([]interface{}); hasArgs && ok {
|
||||
var parsed []string
|
||||
for _, arg := range raw {
|
||||
if v, ok := arg.(string); !ok {
|
||||
v, ok := arg.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("Watch args must be a list of strings")
|
||||
}
|
||||
|
||||
|
|
|
@ -110,12 +110,12 @@ func GetDNSConfig(conf *config.RuntimeConfig) *dnsConfig {
|
|||
func (d *DNSServer) ListenAndServe(network, addr string, notif func()) error {
|
||||
mux := dns.NewServeMux()
|
||||
mux.HandleFunc("arpa.", d.handlePtr)
|
||||
mux.HandleFunc(s.domain, dhandleQuery)
|
||||
mux.HandleFunc(d.domain, d.handleQuery)
|
||||
if len(d.recursors) > 0 {
|
||||
mux.HandleFunc(".", d.handleRecurse)
|
||||
}
|
||||
|
||||
s.Server = &dns.Server{
|
||||
d.Server = &dns.Server{
|
||||
Addr: addr,
|
||||
Net: network,
|
||||
Handler: mux,
|
||||
|
|
Loading…
Reference in New Issue