Skip to content

Commit

Permalink
Fix stream timer leak (#182)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art committed Jan 10, 2024
1 parent 6718781 commit 761adec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func (s *Stream) recvReply() (*vppReply, error) {
timeout = maxInt64
}
timeoutTimer := time.NewTimer(timeout)
defer timeoutTimer.Stop()
select {
case reply, ok := <-s.channel.replyChan:
if !ok {
Expand Down

0 comments on commit 761adec

Please sign in to comment.