mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
don't over allocate slice
This commit is contained in:
parent
d210242875
commit
01424ba146
@ -262,7 +262,7 @@ func changeTypeFromChange(change memdb.Change) changeType {
|
|||||||
// switching connection details to be the proxy instead of the actual instance
|
// switching connection details to be the proxy instead of the actual instance
|
||||||
// in case of a sidecar.
|
// in case of a sidecar.
|
||||||
func serviceHealthToConnectEvents(events ...stream.Event) []stream.Event {
|
func serviceHealthToConnectEvents(events ...stream.Event) []stream.Event {
|
||||||
serviceHealthConnectEvents := make([]stream.Event, 0, len(events))
|
var serviceHealthConnectEvents []stream.Event
|
||||||
for _, event := range events {
|
for _, event := range events {
|
||||||
if event.Topic != TopicServiceHealth {
|
if event.Topic != TopicServiceHealth {
|
||||||
// Skip non-health or any events already emitted to Connect topic
|
// Skip non-health or any events already emitted to Connect topic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user