]> Sergey Matveev's repositories - btrtrc.git/blobdiff - client.go
Extract the request strategy logic
[btrtrc.git] / client.go
index 260219cb4e14df6f277c32f5e14d394352238cf9..0dab418c212df07a609ea537869914f2a87fdaa6 100644 (file)
--- 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:   2,
+               requestStrategy:   requestStrategyOne{},
                metadataChanged: sync.Cond{
                        L: cl.locker(),
                },
-               duplicateRequestTimeout: 1 * time.Second,
+               _duplicateRequestTimeout: 1 * time.Second,
        }
        t.logger = cl.logger.WithValues(t).WithText(func(m log.Msg) string {
                return fmt.Sprintf("%v: %s", t, m.Text())