From fe07757574dcda6b6ee9ca06ddf8471fbb2a90bb Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sat, 20 May 2006 12:07:14 +0000 Subject: [PATCH] BitTorrent: Remove a superfluous check and assignment choke_bittorrent_peer checks and sets peer->remote.choked, so do not do it again in the caller. --- src/protocol/bittorrent/connection.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/protocol/bittorrent/connection.c b/src/protocol/bittorrent/connection.c index b55832b24..b6ad61ec3 100644 --- a/src/protocol/bittorrent/connection.c +++ b/src/protocol/bittorrent/connection.c @@ -124,10 +124,7 @@ update_bittorrent_connection_state(struct connection *conn) max_uploads--; } else { - if (!peer->remote.choked) - choke_bittorrent_peer(peer); - - peer->remote.choked = 1; + choke_bittorrent_peer(peer); } /* Can remove the peer so we use foreachsafe(). */