Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
mattayes committed Dec 21, 2023
1 parent f8fbefb commit 94b5ecf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions opwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ func NewOpWindow(depth, width int, windowedBy time.Duration) *OpWindow {

// Close provides graceful shutdown: no new ops will be enqueued.
func (q *OpWindow) Close() {
q.mu.Lock()
defer q.mu.Unlock()

q.once.Do(func() {
q.mu.Lock()
defer q.mu.Unlock()
close(q.done)
// HACK (2023-12) (mh): Set depth to zero so new entries are rejected.
q.depth = 0
Expand Down

0 comments on commit 94b5ecf

Please sign in to comment.