From df0de9433783305c4ae82a96a3a57d25260960b0 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 18 Oct 2017 11:51:19 -0400 Subject: [PATCH] frontend/http: bandwidth are in bytes not pieces --- frontend/http/parser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/http/parser.go b/frontend/http/parser.go index ef7b207..3053d82 100644 --- a/frontend/http/parser.go +++ b/frontend/http/parser.go @@ -65,19 +65,19 @@ func ParseAnnounce(r *http.Request, opts ParseOptions) (*bittorrent.AnnounceRequ } request.Peer.ID = bittorrent.PeerIDFromString(peerID) - // Determine the number of remaining pieces for the client. + // Determine the number of remaining bytes for the client. request.Left, err = qp.Uint64("left") if err != nil { return nil, bittorrent.ClientError("failed to parse parameter: left") } - // Determine the number of pieces downloaded by the client. + // Determine the number of bytes downloaded by the client. request.Downloaded, err = qp.Uint64("downloaded") if err != nil { return nil, bittorrent.ClientError("failed to parse parameter: downloaded") } - // Determine the number of pieces shared by the client. + // Determine the number of bytes shared by the client. request.Uploaded, err = qp.Uint64("uploaded") if err != nil { return nil, bittorrent.ClientError("failed to parse parameter: uploaded")