mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-14 23:43:56 +02:00
chore(cyberghost/updater): do not log warnings for "no such host"
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/models"
|
"github.com/qdm12/gluetun/internal/models"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
@@ -18,6 +19,9 @@ func (u *Updater) FetchServers(ctx context.Context, minServers int) (
|
|||||||
resolveSettings := parallelResolverSettings(possibleHosts)
|
resolveSettings := parallelResolverSettings(possibleHosts)
|
||||||
hostToIPs, warnings, err := u.parallelResolver.Resolve(ctx, resolveSettings)
|
hostToIPs, warnings, err := u.parallelResolver.Resolve(ctx, resolveSettings)
|
||||||
for _, warning := range warnings {
|
for _, warning := range warnings {
|
||||||
|
if strings.HasSuffix(warning, "no such host") {
|
||||||
|
continue // ignore no such host warnings
|
||||||
|
}
|
||||||
u.warner.Warn(warning)
|
u.warner.Warn(warning)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user