18335194 by astaxie

fix runrouter is nil

1 parent 6c13bdde
...@@ -846,7 +846,12 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -846,7 +846,12 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
846 Admin: 846 Admin:
847 //admin module record QPS 847 //admin module record QPS
848 if EnableAdmin { 848 if EnableAdmin {
849 go admin.StatisticsMap.AddStatistics(r.Method, requestPath, runrouter.controllerType.Name(), time.Since(starttime)) 849 if runrouter != nil {
850 go admin.StatisticsMap.AddStatistics(r.Method, requestPath, runrouter.controllerType.Name(), time.Since(starttime))
851 } else {
852 go admin.StatisticsMap.AddStatistics(r.Method, requestPath, "", time.Since(starttime))
853 }
854
850 } 855 }
851 } 856 }
852 857
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!