18335194 by astaxie

fix runrouter is nil

1 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))
}
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!