fix golang lint errors again

This commit is contained in:
Siyuan 2025-10-10 14:19:36 +00:00
parent 1f568c96dd
commit bb45be1d6d
2 changed files with 7 additions and 3 deletions

View File

@ -157,7 +157,7 @@ func rpcSetNetworkSettings(settings RpcNetworkSettings) (*RpcNetworkSettings, er
l.Debug().Msg("setting new config") l.Debug().Msg("setting new config")
rebootRequired := false var rebootRequired bool
if netConfig.DHCPClient.String != config.NetworkConfig.DHCPClient.String { if netConfig.DHCPClient.String != config.NetworkConfig.DHCPClient.String {
rebootRequired = true rebootRequired = true
} }
@ -182,7 +182,9 @@ func rpcSetNetworkSettings(settings RpcNetworkSettings) (*RpcNetworkSettings, er
} }
if rebootRequired { if rebootRequired {
rpcReboot(false) if err := rpcReboot(false); err != nil {
return nil, err
}
} }
return toRpcNetworkSettings(newConfig), nil return toRpcNetworkSettings(newConfig), nil

View File

@ -210,7 +210,9 @@ func (nm *NetlinkManager) EnsureInterfaceUpWithTimeout(ctx context.Context, ifac
return nil, ErrInterfaceUpCanceled return nil, ErrInterfaceUpCanceled
case <-linkUpTimeout: case <-linkUpTimeout:
attempt++ attempt++
l.Error().Msg("interface is still down after timeout") l.Error().
Int("attempt", attempt).
Msg("interface is still down after timeout")
if err != nil { if err != nil {
return nil, err return nil, err
} }