Skip to content

Commit

Permalink
Trying to fix a race warning
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Davis <dug@microsoft.com>
  • Loading branch information
duglin committed Apr 11, 2023
1 parent 17706ee commit 75e612b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocol/kafka_sarama/v2/sender_test.go
Expand Up @@ -74,6 +74,8 @@ func (s *syncProducerMock) AbortTxn() error {
}

func (s *syncProducerMock) TxnStatus() sarama.ProducerTxnStatusFlag {
s.lock.Lock()
defer s.lock.Unlock()
return s.status
}

Expand Down

0 comments on commit 75e612b

Please sign in to comment.