1
0
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:
astaxie 2013-11-13 21:37:17 +08:00
parent 6c13bdde25
commit 18335194bc

View File

@ -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))
}
}
}