diff --git a/queue.go b/queue.go index fb701cf..90490d2 100644 --- a/queue.go +++ b/queue.go @@ -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