don't error when get tc stats fails (#1386)

This commit is contained in:
Mathew Kamkar
2023-02-10 10:05:45 -08:00
committed by GitHub
parent ce07914e44
commit 937256d89e
3 changed files with 8 additions and 6 deletions
+2 -4
View File
@@ -118,10 +118,8 @@ func GetUpdatedNodeStats(prev *livekit.NodeStats, prevAverage *livekit.NodeStats
memUsed = memInfo.Used
}
sysPackets, sysDroppedPackets, err := getTCStats()
if err != nil {
return nil, false, err
}
// do not error out, and use the information if it is available
sysPackets, sysDroppedPackets, _ := getTCStats()
promSysPacketGauge.WithLabelValues("out").Set(float64(sysPackets - sysPacketsStart))
promSysPacketGauge.WithLabelValues("dropped").Set(float64(sysDroppedPackets - sysDroppedPacketsStart))