mirror of
https://github.com/status-im/consul.git
synced 2025-01-26 05:29:55 +00:00
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.
This commit is contained in:
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…
x
Reference in New Issue
Block a user