mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 09:25:46 +03:00
Address @chelseakomlo comments
This commit is contained in:
@@ -940,7 +940,7 @@ func isTooManyColons(err error) bool {
|
||||
return err != nil && strings.Contains(err.Error(), tooManyColons)
|
||||
}
|
||||
|
||||
// Merge is used to merge two ACL configs together
|
||||
// Merge is used to merge two ACL configs together. The settings from the input always take precedence.
|
||||
func (a *ACLConfig) Merge(b *ACLConfig) *ACLConfig {
|
||||
result := *a
|
||||
|
||||
|
||||
@@ -108,6 +108,9 @@ func (a *ACL) ListPolicies(args *structs.ACLPolicyListRequest, reply *structs.AC
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ensure we never set the index to zero, otherwise a blocking query cannot be used.
|
||||
// We floor the index at one, since realistically the first write must have a higher index.
|
||||
if index == 0 {
|
||||
index = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user