Merge: * set BlockingMode: "null_ip" by default; minor improvements
Squashed commit of the following: commit 653544b98dc4d1b9a74e1509d0e6104b71bcdcb3 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 17:34:41 2019 +0300 * DNS reconfigure: protect against delayed socket fd close commit 9e650f37dee7f771bf1d9d714c35f0a81788aa16 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 15:28:33 2019 +0300 - fix race on startup commit 878fdb8fc4ebbc6fab683a65f5e4298e64c2073e Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 15:11:21 2019 +0300 * travis: don't run tests commit 1c4ab60684ee22d55e6d2a3350c0f24d9844255c Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 14:56:28 2019 +0300 * travis: 'release.sh' and then run tests commit e1f644b8d9a1f3b46990cdfb1b75fd81b3a49d33 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 14:52:59 2019 +0300 * set BlockingMode: "null_ip" by default
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user