Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func (q *DQue) Close() error {
q.emptyCond.Broadcast()

// Safe-guard ourself from accidentally using segments after closing the queue

q.firstSegment.file.Close()
q.lastSegment.file.Close()

q.firstSegment = nil
q.lastSegment = nil

Expand Down