diff --git a/cmd/common-main.go b/cmd/common-main.go index aa8fcfbfe..8b4786139 100644 --- a/cmd/common-main.go +++ b/cmd/common-main.go @@ -136,6 +136,7 @@ func init() { gob.Register(StorageErr("")) gob.Register(madmin.TimeInfo{}) + gob.Register(madmin.XFSErrorConfigs{}) gob.Register(map[string]interface{}{}) defaultAWSCredProvider = []credentials.Provider{ diff --git a/cmd/peer-rest-client.go b/cmd/peer-rest-client.go index 6d2e83bdb..fb4c41121 100644 --- a/cmd/peer-rest-client.go +++ b/cmd/peer-rest-client.go @@ -178,9 +178,7 @@ func (client *peerRESTClient) GetSysConfig(ctx context.Context) (info madmin.Sys defer xhttp.DrainBody(respBody) err = gob.NewDecoder(respBody).Decode(&info) - cfg := info.Config["time-info"] - if cfg != nil { - ti := cfg.(madmin.TimeInfo) + if ti, ok := info.Config["time-info"].(madmin.TimeInfo); ok { ti.RoundtripDuration = roundtrip info.Config["time-info"] = ti }