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:
Sebastiaan van Stijn
2026-05-05 19:03:46 +02:00
parent 20a68f39c4
commit c4df56a7aa

View File

@@ -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()