projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6c757c
)
Fix https://github.com/anacrolix/torrent/issues/388
author
Matt Joiner <anacrolix@gmail.com>
Tue, 19 May 2020 05:00:08 +0000 (15:00 +1000)
committer
Matt Joiner <anacrolix@gmail.com>
Tue, 19 May 2020 05:00:08 +0000 (15:00 +1000)
torrent.go
patch
|
blob
|
history
diff --git
a/torrent.go
b/torrent.go
index 927b25fdbdce28d07cc1ebab9992ed89c1393136..195027a3cca0f36a6b12eed3f162d1bc18281793 100644
(file)
--- a/
torrent.go
+++ b/
torrent.go
@@
-377,6
+377,9
@@
func (t *Torrent) cacheLength() {
}
func (t *Torrent) setInfo(info *metainfo.Info) error {
+ if t.info != nil {
+ return errors.New("info already set")
+ }
if err := validateInfo(info); err != nil {
return fmt.Errorf("bad info: %s", err)
}