From 381fb293a57acf98f1430cf1dc1b6eca9db71b21 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 10 Jan 2020 09:43:44 +1100 Subject: [PATCH] Fix typos and spellos in comments --- connection.go | 9 ++++----- torrent.go | 11 +++++------ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/connection.go b/connection.go index 61cbadf8..50b5ee35 100644 --- a/connection.go +++ b/connection.go @@ -390,12 +390,11 @@ func (cn *connection) nominalMaxRequests() (ret int) { 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 8ef5f0fc..423614b4 100644 --- a/torrent.go +++ b/torrent.go @@ -46,12 +46,11 @@ type Torrent struct { 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