mirror of
https://github.com/moby/moby.git
synced 2026-08-03 22:51:03 +00:00
daemon/libnetwork: waitForLocalDNSServer: rm error-type assert
Similar to 943f46c425c0916296f5478d0aa3de6c660c9bbd; slight change in behavior, because previously, other errors would not be retried, but also didn't mark the check as failed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -124,15 +124,12 @@ func waitForLocalDNSServer(t *testing.T) {
|
||||
tconn, err := net.DialTimeout("tcp", "127.0.0.1:53", 10*time.Second)
|
||||
retries = retries + 1
|
||||
if err != nil {
|
||||
if oerr, ok := err.(*net.OpError); ok {
|
||||
if errors.Is(err, syscall.ECONNREFUSED) {
|
||||
// server is probably initializing
|
||||
if errors.Is(oerr.Err, syscall.ECONNREFUSED) {
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
// something is wrong: we should stop for analysis
|
||||
t.Fatal(err)
|
||||
continue
|
||||
}
|
||||
// something is wrong: we should stop for analysis
|
||||
t.Fatal(err)
|
||||
}
|
||||
if tconn != nil {
|
||||
tconn.Close()
|
||||
|
||||
Reference in New Issue
Block a user