Skip to content

Commit

Permalink
[FlowAggregator] Close connection to IPFIX collector on Stop (#6635)
Browse files Browse the repository at this point in the history
When the IPFIX exporter is stopped in the Flow Aggregator, the
connection to the collector should be explicitly closed.

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
  • Loading branch information
antoninbas authored Aug 28, 2024
1 parent cd19aac commit 8167f95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/flowaggregator/exporter/ipfix.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ func NewIPFIXExporter(
}

func (e *IPFIXExporter) Start() {
// no-op
// no-op, initIPFIXExportingProcess will be called whenever AddRecord is
// called as needed.
}

func (e *IPFIXExporter) Stop() {
// no-op
if e.exportingProcess != nil {
e.exportingProcess.CloseConnToCollector()
e.exportingProcess = nil
}
}

func (e *IPFIXExporter) AddRecord(record ipfixentities.Record, isRecordIPv6 bool) error {
Expand Down

0 comments on commit 8167f95

Please sign in to comment.