From 6ddad7bcbef069a580211c049fe715c77b5719f9 Mon Sep 17 00:00:00 2001 From: Jesper Louis Andersen Date: Fri, 25 Jul 2008 23:36:06 +0200 Subject: [PATCH] Fix choking state calculation for leechers. Our code did not fill the #rechoke_info record correctly for leechers. This has resulted in wrong choking. --- lib/etorrent-1.0/src/etorrent_choker.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/etorrent-1.0/src/etorrent_choker.erl b/lib/etorrent-1.0/src/etorrent_choker.erl index eeea7fe..97989bd 100644 --- a/lib/etorrent-1.0/src/etorrent_choker.erl +++ b/lib/etorrent-1.0/src/etorrent_choker.erl @@ -281,6 +281,12 @@ build_rechoke_info(Seeding, [Pid | Next]) -> kind = Kind, state = leeching, rate = -Rate, % Inverted for later sorting! + r_interest_state = + PeerState#peer_state.interest_state, + r_choke_state = + PeerState#peer_state.choke_state, + l_choke = + PeerState#peer_state.local_choke, snubbed = Snubbed } | build_rechoke_info(Seeding, Next)] end -- 2.11.4.GIT