mirror of
https://github.com/cloudflare/cloudflared.git
synced 2026-05-14 19:40:41 +00:00
TUN-8456: Update quic-go to 0.45 and collect mtu and congestion control metrics
This commit is contained in:
committed by
Chung-Ting Huang
parent
cb6e5999e1
commit
0b62d45738
+2
-2
@@ -152,7 +152,7 @@ func (fs FS) Meminfo() (Meminfo, error) {
|
||||
|
||||
m, err := parseMemInfo(bytes.NewReader(b))
|
||||
if err != nil {
|
||||
return Meminfo{}, fmt.Errorf("failed to parse meminfo: %w", err)
|
||||
return Meminfo{}, fmt.Errorf("%s: %w", ErrFileParse, err)
|
||||
}
|
||||
|
||||
return *m, nil
|
||||
@@ -165,7 +165,7 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) {
|
||||
// Each line has at least a name and value; we ignore the unit.
|
||||
fields := strings.Fields(s.Text())
|
||||
if len(fields) < 2 {
|
||||
return nil, fmt.Errorf("malformed meminfo line: %q", s.Text())
|
||||
return nil, fmt.Errorf("%w: Malformed line %q", ErrFileParse, s.Text())
|
||||
}
|
||||
|
||||
v, err := strconv.ParseUint(fields[1], 0, 64)
|
||||
|
||||
Reference in New Issue
Block a user