Follow-up Comment #1, patch #4417 (project mldonkey):
Since BT support needs to write packets much bigger than what the upload
scheduler usually allows in one turn, it uses private accumulators to gather
"upload credits".
The problem probably comes from the fact that private accumulators are not
bounded, and increased unconditionally.
Maybe they should be checked against the available buffer space:
(untested)
--- src/networks/bittorrent/bTClients.ml 8 Sep 2005 12:26:01 -0000
1.50
+++ src/networks/bittorrent/bTClients.ml 14 Sep 2005 15:31:24 -0000
@@ -1501,9 +1492,12 @@
match c.client_upload_requests with
[] -> ()
| _ :: tail ->
- CommonUploads.consume_bandwidth allowed;
- c.client_allowed_to_write <-
- c.client_allowed_to_write ++ (Int64.of_int allowed);
+ let new_allowed_to_write =
+ c.client_allowed_to_write ++ (Int64.of_int allowed) in
+ if allowed > 0 && CommonUploads.can_write_len sock (Int64.to_int
new_allowed_to_write) then begin
+ CommonUploads.consume_bandwidth allowed;
+ c.client_allowed_to_write <- new_allowed_to_write;
+ end;
iter_upload sock c
)
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=4417>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
_______________________________________________
Mldonkey-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/mldonkey-users