diff --git a/application.go b/application.go index c46e7ee..4148797 100644 --- a/application.go +++ b/application.go @@ -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-- } //接口服务