effigies / BitTornado

UNMAINTAINED - John Hoffman's fork of the original bittorrent
Other
150 stars 44 forks source link

if the leecher sudden disconnection.how to give hint or exit the download script? #43

Open yang502 opened 8 years ago

yang502 commented 8 years ago

I am using the branch on Python2.7

when I download the file from seeder , the network of leecher was unexpect lost .But I didin't now , and the btdownloadheaderless.py was running . So I wander if it is possible to give hint (off the net ) or exit the .py

effigies commented 8 years ago

BitTorrent is intended to be resilient to network (and individual connection) losses, picking up again when connections are re-established. Adding warnings about connection losses would end up alerting most users to a thing that isn't a problem.

I'd be willing to review a PR, but as this isn't a bug, it will not be a priority for me to add this feature. To accept a PR, it would have to be a command-line option (like --alert-lost-connection or something) and it should be disabled by default.

I think the place to start would be in BitTornado/Client/Connecter.py. You'll probably want to pass BT1Download.errorfunc into the Connecter object, so that you can display a message.

yang502 commented 8 years ago

Thanks for your reply! now for me , BtiTornado can picking up again when connections are re-established is enough !