mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 14:10:49 +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 {
|
||||
go admin.StatisticsMap.AddStatistics(r.Method, requestPath, runrouter.controllerType.Name(), time.Since(starttime))
|
||||
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