Close torrent storage asynchronously on drop
This commit is contained in:
parent
5eab39001f
commit
1d53c170b0
|
@ -64,7 +64,6 @@ func (me *sqlitePieceCompletion) Close() (err error) {
|
|||
defer me.mu.Unlock()
|
||||
if me.db != nil {
|
||||
err = me.db.Close()
|
||||
me.db = nil
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -799,7 +799,7 @@ func (t *Torrent) close() (err error) {
|
|||
t.closed.Set()
|
||||
t.tickleReaders()
|
||||
if t.storage != nil {
|
||||
func() {
|
||||
go func() {
|
||||
t.storageLock.Lock()
|
||||
defer t.storageLock.Unlock()
|
||||
if f := t.storage.Close; f != nil {
|
||||
|
|
Loading…
Reference in New Issue