This commit is contained in:
Zheng Kai
2023-04-27 16:02:58 +08:00
parent 92b017d0e1
commit 894b62bf29
10 changed files with 101 additions and 63 deletions

View File

@@ -14,7 +14,11 @@ func doMetrics(ab []byte, cached bool, r *http.Request) {
metrics.RspBytes(len(ab))
o := &pb.Rsp{}
json.Unmarshal(ab, o)
err := json.Unmarshal(ab, o)
if err != nil {
zj.J(`unmarshal fail`, err)
return
}
u := o.GetUsage()
if u == nil {