Skip to content

Commit

Permalink
fix optimistic unchoking
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Feb 28, 2019
1 parent 4db8532 commit adfd57d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torrent/choking.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (t *torrent) candidatesUnchoke() []*peer.Peer {
func (t *torrent) candidatesUnchokeOptimistic() []*peer.Peer {
peers := make([]*peer.Peer, 0, len(t.peers))
for pe := range t.peers {
if pe.PeerInterested && pe.ClientChoking {
if pe.PeerInterested && pe.ClientChoking && pe.OptimisticUnchoked {
peers = append(peers, pe)
}
}
Expand Down

0 comments on commit adfd57d

Please sign in to comment.