diff --git a/.travis.yml b/.travis.yml index 3d5f0cc6..d04c24b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,6 @@ matrix: script: - node -v - npm -v - # Run tests just in case - - go test -race -v -bench=. ./... # Prepare releases - ./release.sh - ls -l dist diff --git a/dnsforward/dnsforward.go b/dnsforward/dnsforward.go index 404d1ca0..2988133d 100644 --- a/dnsforward/dnsforward.go +++ b/dnsforward/dnsforward.go @@ -360,10 +360,9 @@ func (s *Server) Reconfigure(config *ServerConfig) error { return errorx.Decorate(err, "could not reconfigure the server") } - // On some Windows versions the UDP port we've just closed in proxy.Stop() doesn't get actually closed right away. - if runtime.GOOS == "windows" { - time.Sleep(1 * time.Second) - } + // It seems that net.Listener.Close() doesn't close file descriptors right away. + // We wait for some time and hope that this fd will be closed. + time.Sleep(100 * time.Millisecond) err = s.Prepare(config) if err != nil { diff --git a/home/config.go b/home/config.go index 3d99160b..019612eb 100644 --- a/home/config.go +++ b/home/config.go @@ -157,9 +157,9 @@ var config = configuration{ Port: 53, StatsInterval: 1, FilteringConfig: dnsforward.FilteringConfig{ - ProtectionEnabled: true, // whether or not use any of dnsfilter features - BlockingMode: "nxdomain", // mode how to answer filtered requests - BlockedResponseTTL: 10, // in seconds + ProtectionEnabled: true, // whether or not use any of dnsfilter features + BlockingMode: "null_ip", // mode how to answer filtered requests + BlockedResponseTTL: 10, // in seconds Ratelimit: 20, RefuseAny: true, AllServers: false, diff --git a/home/home.go b/home/home.go index 66309c53..9315ca0b 100644 --- a/home/home.go +++ b/home/home.go @@ -172,7 +172,7 @@ func run(args options) { log.Fatalf("%s", err) } go func() { - err = startDNSServer() + err := startDNSServer() if err != nil { log.Fatal(err) }