mirror of https://github.com/jetkvm/kvm.git
fix golang lint errors again
This commit is contained in:
parent
1f568c96dd
commit
bb45be1d6d
|
|
@ -157,7 +157,7 @@ func rpcSetNetworkSettings(settings RpcNetworkSettings) (*RpcNetworkSettings, er
|
|||
|
||||
l.Debug().Msg("setting new config")
|
||||
|
||||
rebootRequired := false
|
||||
var rebootRequired bool
|
||||
if netConfig.DHCPClient.String != config.NetworkConfig.DHCPClient.String {
|
||||
rebootRequired = true
|
||||
}
|
||||
|
|
@ -182,7 +182,9 @@ func rpcSetNetworkSettings(settings RpcNetworkSettings) (*RpcNetworkSettings, er
|
|||
}
|
||||
|
||||
if rebootRequired {
|
||||
rpcReboot(false)
|
||||
if err := rpcReboot(false); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return toRpcNetworkSettings(newConfig), nil
|
||||
|
|
|
|||
|
|
@ -210,7 +210,9 @@ func (nm *NetlinkManager) EnsureInterfaceUpWithTimeout(ctx context.Context, ifac
|
|||
return nil, ErrInterfaceUpCanceled
|
||||
case <-linkUpTimeout:
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue