consul: Fixing potential issue with blocking queries for {Session,ACL}.Get

This commit is contained in:
Armon Dadgar 2015-01-13 12:02:30 -08:00
parent 6da4761221
commit 1956c07034
2 changed files with 4 additions and 0 deletions

View File

@ -139,6 +139,8 @@ func (a *ACL) Get(args *structs.ACLSpecificRequest,
reply.Index = index
if acl != nil {
reply.ACLs = structs.ACLs{acl}
} else {
reply.ACLs = nil
}
return err
})

View File

@ -117,6 +117,8 @@ func (s *Session) Get(args *structs.SessionSpecificRequest,
reply.Index = index
if session != nil {
reply.Sessions = structs.Sessions{session}
} else {
reply.Sessions = nil
}
return err
})