Commit 18335194 authored by astaxie's avatar astaxie

fix runrouter is nil

parent 6c13bdde
......@@ -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))
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment