Merge pull request #508 from shirou/issue507

[host] Fix docker uptime parsing (fix #507)
pull/509/head
shirou 7 years ago committed by GitHub
commit cd915bdc31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -146,7 +146,7 @@ func BootTimeWithContext(ctx context.Context) (uint64, error) {
return 0, fmt.Errorf("wrong uptime format")
}
f := strings.Fields(lines[0])
b, err := strconv.ParseInt(f[0], 10, 64)
b, err := strconv.ParseFloat(f[0], 64)
if err != nil {
return 0, err
}

Loading…
Cancel
Save