forked from golang/hotime
树状结构优化
This commit is contained in:
parent
72c23499f2
commit
2ee0838d8a
@ -374,15 +374,17 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) {
|
||||
}()
|
||||
|
||||
//访问拦截true继续false暂停
|
||||
connectListenerLen := len(that.connectListener)
|
||||
|
||||
for i := 0; i < connectListenerLen; i++ {
|
||||
|
||||
if that.connectListener[i](&context) {
|
||||
connectListenerLen := len(that.connectListener) - 1
|
||||
|
||||
for true {
|
||||
if connectListenerLen < 0 {
|
||||
break
|
||||
}
|
||||
if that.connectListener[connectListenerLen](&context) {
|
||||
context.View()
|
||||
return
|
||||
}
|
||||
connectListenerLen--
|
||||
}
|
||||
|
||||
//接口服务
|
||||
|
Loading…
Reference in New Issue
Block a user