cmd/ctrld: make staticcheck happy

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-03-07 10:28:49 +07:00
1 parent fb20d443c1
commit b0114dfaeb
5 files changed
+9 -8

No files matched your search

+3 -3
View File
@@ -60,11 +60,11 @@ func FetchResolverConfig(uid string) (*ResolverConfig, error) {
transport.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
// We experiment hanging in TLS handshake when connecting to ControlD API
// with ipv6. So prefer ipv4 if available.
network = "tcp6"
proto := "tcp6"
if ctrldnet.SupportsIPv4() {
network = "tcp4"
proto = "tcp4"
}
return ctrldnet.Dialer.DialContext(ctx, network, addr)
return ctrldnet.Dialer.DialContext(ctx, proto, addr)
}
client := http.Client{
Timeout: 10 * time.Second,
+2 -3
View File
@@ -100,9 +100,8 @@ type resolvedManager struct {
logf logger.Logf
ifidx int
configCR chan changeRequest // tracks OSConfigs changes and error responses
revertCh chan struct{}
newManager func(conn *dbus.Conn) dbus.BusObject
configCR chan changeRequest // tracks OSConfigs changes and error responses
revertCh chan struct{}
}
var _ OSConfigurator = (*resolvedManager)(nil)