Skip to content

Commit

Permalink
fixed data race
Browse files Browse the repository at this point in the history
Signed-off-by: niqote <niqote@yandex-team.ru>
  • Loading branch information
niqote committed Jan 16, 2024
1 parent 57d1ca2 commit 6cf8949
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ func (s *Stream) Identifier() uint32 {
// IsFinished returns whether the stream has finished
// sending data
func (s *Stream) IsFinished() bool {
s.finishLock.Lock()
defer s.finishLock.Unlock()
return s.finished
}

Expand Down

0 comments on commit 6cf8949

Please sign in to comment.