]> Sergey Matveev's repositories - btrtrc.git/commitdiff
storage: ClientImpl interface now includes Close
authorMatt Joiner <anacrolix@gmail.com>
Tue, 25 Oct 2016 09:00:09 +0000 (20:00 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 25 Oct 2016 09:00:09 +0000 (20:00 +1100)
This is now necessary because bolt doesn't allow multiple DB handles, so the bolt piece completion DB instance must be at the client level. The new method is not currently used from the Client however, this maybe necessary to avoid leaks.

storage/interface.go

index 982b8eed4b79f8905ddcef96b58989bc424470ac..80182c9644e4943a854eaefcac64193acd128d5c 100644 (file)
@@ -9,6 +9,7 @@ import (
 // Represents data storage for an unspecified torrent.
 type ClientImpl interface {
        OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (TorrentImpl, error)
+       Close() error
 }
 
 // Data storage bound to a torrent.