mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 17:00:54 +00:00
fix runrouter is nil
This commit is contained in:
parent
6c13bdde25
commit
18335194bc
@ -846,7 +846,12 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
Admin:
|
||||
//admin module record QPS
|
||||
if EnableAdmin {
|
||||
if runrouter != nil {
|
||||
go admin.StatisticsMap.AddStatistics(r.Method, requestPath, runrouter.controllerType.Name(), time.Since(starttime))
|
||||
} else {
|
||||
go admin.StatisticsMap.AddStatistics(r.Method, requestPath, "", time.Since(starttime))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user