Skip to content

Commit

Permalink
cleanup ticker in connection.readStub
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Jun 26, 2022
1 parent 8907d1e commit cc0c55f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/packetgen/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func readStub(ctx context.Context, conn net.Conn, c *netReaderConfig) {
const bufSize = 1024
buf := make([]byte, bufSize)
ticker := time.NewTicker(c.Interval)
defer ticker.Stop()

for {
select {
Expand Down

0 comments on commit cc0c55f

Please sign in to comment.