download_strategies.go | 8 ++++++++ diff --git a/download_strategies.go b/download_strategies.go index 2cc7289edb6213d1d50b5579b8f8be3ac2b30c78..8be1be40c5ff38e8647b16a87af4bb989d9c2690 100644 --- a/download_strategies.go +++ b/download_strategies.go @@ -16,6 +16,14 @@ heat map[*torrent]map[request]int } func (s *DefaultDownloadStrategy) FillRequests(t *torrent, c *connection) { + if c.Interested { + if c.PeerChoked { + return + } + if len(c.Requests) >= c.PeerMaxRequests { + return + } + } th := s.heat[t] addRequest := func(req request) (again bool) { piece := t.Pieces[req.Index]