Skip to content

Commit

Permalink
move lock outside of once.Do
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 committed Dec 16, 2024
1 parent 2cb3519 commit 37b52f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/contribroutines/contribroutines.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ var (
)

func Stop() {
mu.Lock()
defer mu.Unlock()
once.Do(func() {
mu.Lock()
defer mu.Unlock()
close(stop)
})
}
Expand Down

0 comments on commit 37b52f9

Please sign in to comment.