Skip to content

Commit

Permalink
assemblers: remove unused tcp stream waitgroup
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Bond <danbond@protonmail.com>
  • Loading branch information
loshz committed Oct 29, 2023
1 parent fe2ebd3 commit 2e039ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion assemblers/tcp_assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ func (h *tcpAssembler) Stop() {
h.streamPool.Dump()
}

h.streamFactory.WaitGoRoutines()
h.logAssemblerStats()
log.Debug().
Int("closed", closed).
Expand Down
10 changes: 2 additions & 8 deletions assemblers/tcp_stream_factory.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package assemblers

import (
"sync"

"github.com/gopacket/gopacket"
"github.com/gopacket/gopacket/layers"
"github.com/gopacket/gopacket/reassembly"
"github.com/honeycombio/honeycomb-network-agent/config"
"github.com/rs/zerolog/log"

"github.com/honeycombio/honeycomb-network-agent/config"
)

type tcpStreamFactory struct {
config config.Config
wg sync.WaitGroup
eventsChan chan Event
}

Expand All @@ -31,7 +29,3 @@ func (factory *tcpStreamFactory) New(net, transport gopacket.Flow, tcp *layers.T
IncrementActiveStreamCount()
return NewTcpStream(net, transport, factory.config, factory.eventsChan)
}

func (factory *tcpStreamFactory) WaitGoRoutines() {
factory.wg.Wait()
}

0 comments on commit 2e039ad

Please sign in to comment.