Jump to content

Change Behavior when Peer Reconnects during Initial Seeding


Recommended Posts

Currently, there is a incentive for the peer to disconnect and reconnect after receiving piece data (ala BitLord and BitComet, which continues to misbehave in the latest versions). The behavior of clients like this cause about a 15% penalty in the number of bytes I have to upload to Initial Seed a torrent.

In Beta 1.7 build 1170, the amount of data uploaded to a peer is maintained across reconnects. However, no memory is kept of the last piece that was sent. As a result, a different piece is offered when the client reconnects, even if the previous piece has not been reported in someone else's HAVE message.

I propose that if a peer who has indicated INTERESTED in response to the seeder's HAVE message disconnects any time after REQUESTing that piece, and...

(CONDITION 1) ... upon reconnection the peer indicates via a HAVE message that they HAVE the last-sent piece, that no new piece and no upload slot be offered that client until someone else sends a HAVE message regarding the previously sent piece. (This condition also satisfies the situation where last-sent piece was sent to another client between the offending client's reconnections.)

(CONDITION 2) ... upon reconnection does not indicate via a HAVE message that they have the last-sent piece, that the previously offered piece is offered in a HAVE message to the reconnecting client. In this condition, the reconnecting client will be allowed to request all or part of the piece (since the reconnection may be innocent).

In either case, if the peer fails to indicate INTERESTED to an offered piece, the client should be dropped according to the idle client timeout setting and the memory of that last offered piece erased. (Erasing the memory of the last offered piece would avoid a "game-over" or "standoff" situation but would still present a significant disadvantage to a misbehaving client.)

Thank you for considering this request...

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...