From b06b7fdf7b97cd60c6f3f36bd575b513ff67bdef Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 14 Jun 2006 21:08:55 +0000 Subject: [PATCH] added block requesting fix --- src/policy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/policy.cpp b/src/policy.cpp index be1e51187..06eccade9 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -218,7 +218,8 @@ namespace // this peer doesn't have a faster connection than the // slowest peer. Don't take over any blocks - const int queue_size = (int)c.download_queue().size(); + const int queue_size = (int)c.download_queue().size() + + (int)c.request_queue().size(); const float weight = queue_size == 0 ? std::numeric_limits::max() : c.statistics().download_payload_rate() / queue_size;