Fix bad init of Torrent.requestStrategy

This commit is contained in:
Matt Joiner 2020-01-14 10:30:20 +11:00
parent 35cdebdc3b
commit cfc68d3ae6
1 changed files with 1 additions and 1 deletions

View File

@ -1039,11 +1039,11 @@ func (cl *Client) newTorrent(ih metainfo.Hash, specStorage storage.ClientImpl) (
maxEstablishedConns: cl.config.EstablishedConnsPerTorrent,
networkingEnabled: true,
requestStrategy: cl.config.DefaultRequestStrategy(t.requestStrategyCallbacks()),
metadataChanged: sync.Cond{
L: cl.locker(),
},
}
t.requestStrategy = cl.config.DefaultRequestStrategy(t.requestStrategyCallbacks())
t.logger = cl.logger.WithValues(t).WithText(func(m log.Msg) string {
return fmt.Sprintf("%v: %s", t, m.Text())
})