don't over allocate slice
This commit is contained in:
parent
5f52220f53
commit
68682e7e83
|
@ -262,7 +262,7 @@ func changeTypeFromChange(change memdb.Change) changeType {
|
|||
// switching connection details to be the proxy instead of the actual instance
|
||||
// in case of a sidecar.
|
||||
func serviceHealthToConnectEvents(events ...stream.Event) []stream.Event {
|
||||
serviceHealthConnectEvents := make([]stream.Event, 0, len(events))
|
||||
var serviceHealthConnectEvents []stream.Event
|
||||
for _, event := range events {
|
||||
if event.Topic != TopicServiceHealth {
|
||||
// Skip non-health or any events already emitted to Connect topic
|
||||
|
|
Loading…
Reference in New Issue