mirror of https://github.com/hashicorp/consul
Makes empty checkServiceNode return a nil.
The change in #2308 had an inadvertent interface change, so we fix that with a special case in this fix.pull/2313/head
parent
a7cfcc3634
commit
53149bd2f9
|
@ -1248,6 +1248,12 @@ func (s *StateStore) parseCheckServiceNodes(
|
|||
return 0, nil, err
|
||||
}
|
||||
|
||||
// Special-case the zero return value to nil, since this ends up in
|
||||
// external APIs.
|
||||
if len(services) == 0 {
|
||||
return idx, nil, nil
|
||||
}
|
||||
|
||||
results := make(structs.CheckServiceNodes, 0, len(services))
|
||||
for _, sn := range services {
|
||||
// Retrieve the node.
|
||||
|
|
Loading…
Reference in New Issue