Make channel so stop doesn't fail; also, test stop.

This commit is contained in:
Tom Wilkie
2015-10-28 15:25:38 +00:00
parent 6a4c997048
commit c5c115bb0f
2 changed files with 2 additions and 0 deletions

View File

@@ -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

View File

@@ -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)