diff --git a/probe/endpoint/conntrack.go b/probe/endpoint/conntrack.go index 86fe814a0..cb0eb5f94 100644 --- a/probe/endpoint/conntrack.go +++ b/probe/endpoint/conntrack.go @@ -94,6 +94,7 @@ func newConntrackFlowWalker(useConntrack bool, args ...string) flowWalker { result := &conntrackWalker{ activeFlows: map[int64]flow{}, args: args, + quit: make(chan struct{}), } go result.loop() return result diff --git a/probe/endpoint/conntrack_internal_test.go b/probe/endpoint/conntrack_internal_test.go index 278b1ce30..eb737f87c 100644 --- a/probe/endpoint/conntrack_internal_test.go +++ b/probe/endpoint/conntrack_internal_test.go @@ -92,6 +92,7 @@ func TestConntracker(t *testing.T) { } flowWalker := newConntrackFlowWalker(true) + defer flowWalker.stop() // First write out some empty xml for the existing connections ecbw := bufio.NewWriter(existingConnectionsWriter)