storage/bolt_piece.go | 9 +++++++-- diff --git a/storage/bolt_piece.go b/storage/bolt_piece.go index a932bea4cec05686bdffe5cac26ef9d108bbc5ae..663ac35a7762623f81af93fce43e8c2dd6956661 100644 --- a/storage/bolt_piece.go +++ b/storage/bolt_piece.go @@ -4,7 +4,6 @@ import ( "encoding/binary" "io" - "github.com/anacrolix/missinggo/x" "go.etcd.io/bbolt" "github.com/anacrolix/torrent/metainfo" @@ -32,7 +31,13 @@ } func (me *boltDBPiece) Completion() Completion { c, err := me.pc().Get(me.pk()) - x.Pie(err) + switch err { + case bbolt.ErrDatabaseNotOpen: + return Completion{} + case nil: + default: + panic(err) + } return c }