From edd034bdbb9ab9a6982a3f68cf49bb9aec7b02f1 Mon Sep 17 00:00:00 2001 From: inpos Date: Sat, 5 Mar 2016 01:43:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D0=B2?= =?UTF-8?q?=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5=D0=B4=D0=B8=20=D0=BA=D1=83?= =?UTF-8?q?=D1=81=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pyrrent2http/pyrrent2http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pyrrent2http/pyrrent2http.py b/lib/pyrrent2http/pyrrent2http.py index 68106ba..3a54a45 100644 --- a/lib/pyrrent2http/pyrrent2http.py +++ b/lib/pyrrent2http/pyrrent2http.py @@ -203,9 +203,9 @@ class TorrentFile(object): BUF_SIZE = 20 # количество блоковв буфере for i in range(BUF_SIZE): if (next_piece + i < self.endPiece and - not self.pieces_deadlined[(next_piece + i)- self.startPiece] and not self.havePiece(next_piece + i)): + not self.pieces_deadlined[(next_piece + i) - self.startPiece] and not self.havePiece(next_piece + i)): self.tfs.handle.set_piece_deadline(next_piece + i, 70 + (20 * i)) - self.pieces_deadlined[next_piece + i] = True + self.pieces_deadlined[(next_piece + i) - self.startPiece] = True if not self.havePiece(piece): self.log('Waiting for piece %d' % (piece,)) self.tfs.handle.set_piece_deadline(piece, 50)