Skip to content

Commit 0331982

Browse files
committed
fix blocking Depth() call on the closed queue
1 parent bcaf9bf commit 0331982

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

diskqueue.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ func (d *diskQueue) exit(deleted bool) error {
188188
// ensure that ioLoop has exited
189189
<-d.exitSyncChan
190190

191+
close(d.depthChan)
192+
191193
if d.readFile != nil {
192194
d.readFile.Close()
193195
d.readFile = nil

0 commit comments

Comments
 (0)