consul: fast path a typed nil during ACL filtering

This commit is contained in:
Ryan Uber 2015-06-12 16:46:15 -07:00
parent b2556bd4d0
commit d600fad4e7
1 changed files with 3 additions and 1 deletions

View File

@ -349,7 +349,9 @@ func (s *Server) filterACL(token string, subj interface{}) error {
filt.filterServiceNodes(&v.ServiceNodes)
case *structs.IndexedNodeServices:
filt.filterNodeServices(v.NodeServices)
if v.NodeServices != nil {
filt.filterNodeServices(v.NodeServices)
}
case *structs.IndexedCheckServiceNodes:
filt.filterCheckServiceNodes(&v.Nodes)