Fix monkit leaking (#2553)
This commit is contained in:
parent
002d9748ec
commit
5bec820145
@ -203,7 +203,7 @@ func (db *pieceinfo) SpaceUsed(ctx context.Context) (_ int64, err error) {
|
||||
}
|
||||
|
||||
func (db *pieceinfo) loadSpaceUsed(ctx context.Context) {
|
||||
defer mon.Task()(&ctx)
|
||||
defer mon.Task()(&ctx)(nil)
|
||||
db.space.once.Do(func() {
|
||||
usedSpace, _ := db.CalculatedSpaceUsed(ctx)
|
||||
atomic.AddInt64(&db.space.used, usedSpace)
|
||||
|
Loading…
Reference in New Issue
Block a user