From cfc68d3ae6604efb5124f72ad93a2ba5db4e2885 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 14 Jan 2020 10:30:20 +1100 Subject: [PATCH] Fix bad init of Torrent.requestStrategy --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index fddddf48..620b4b62 100644 --- a/client.go +++ b/client.go @@ -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()) })