connection.go | 9 ++++----- torrent.go | 11 +++++------ diff --git a/connection.go b/connection.go index 61cbadf8e419675cfa7240ae386929184e0fb981..50b5ee3584cd00cba541443ff257e110310f5216 100644 --- a/connection.go +++ b/connection.go @@ -390,12 +390,11 @@ return int(clamp( 1, int64(cn.PeerMaxRequests), max( - // It makes sense to always pipeline at least one connection, - // since latency must be non-zero. + // It makes sense to always pipeline at least one connection, since latency must be + // non-zero. 2, - // Request only as many as we expect to receive in the - // dupliateRequestTimeout window. We are trying to avoid having to - // duplicate requests. + // Request only as many as we expect to receive in the duplicateRequestTimeout + // window. We are trying to avoid having to duplicate requests. cn.chunksReceivedWhileExpecting*int64(cn.t.duplicateRequestTimeout)/expectingTime, ), )) diff --git a/torrent.go b/torrent.go index 8ef5f0fc7ab0cad8f863f480f5f81299ae13ce05..423614b41baea2bdd4b4b884d345d07f404ddf0a 100644 --- a/torrent.go +++ b/torrent.go @@ -46,12 +46,11 @@ logger log.Logger networkingEnabled bool - // Determines what chunks to request from peers. 1: Favour higher priority - // pieces with some fuzzing to reduce overlaps and wastage across - // connections. 2: The fastest connection downloads strictly in order of - // priority, while all others adher to their piece inclications. 3: - // Requests are strictly by piece priority, and not duplicated until - // duplicateRequestTimeout is reached. + // Determines what chunks to request from peers. 1: Favour higher priority pieces with some + // fuzzing to reduce overlaps and wastage across connections. 2: The fastest connection + // downloads strictly in order of priority, while all others adhere to their piece inclinations. + // 3: Requests are strictly by piece priority, and not duplicated until duplicateRequestTimeout + // is reached. requestStrategy int // How long to avoid duplicating a pending request. duplicateRequestTimeout time.Duration