forked from I2P_Developers/i2p.i2p
* i2psnark:
- Improve torrent shutdown handling to maximize chance of
announces getting to tracker
- Clean up delete-torrent messages
- Remove redundant shutdown hook
- Avoid NPE in PEX message handling
- Log tweaks
This commit is contained in:
@@ -572,14 +572,24 @@ public class Snark
|
||||
debug("NOT starting TrackerClient???", NOTICE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop contacting the tracker and talking with peers
|
||||
*/
|
||||
public void stopTorrent() {
|
||||
stopTorrent(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop contacting the tracker and talking with peers
|
||||
* @param fast if true, limit the life of the unannounce threads
|
||||
* @since 0.9.1
|
||||
*/
|
||||
public void stopTorrent(boolean fast) {
|
||||
stopped = true;
|
||||
TrackerClient tc = trackerclient;
|
||||
if (tc != null)
|
||||
tc.halt();
|
||||
tc.halt(fast);
|
||||
PeerCoordinator pc = coordinator;
|
||||
if (pc != null)
|
||||
pc.halt();
|
||||
|
||||
Reference in New Issue
Block a user