2005-12-27 jrandom

* Add a new Status: line on the router console - "ERR-ClockSkew", in case
      the clock is too skewed to do anything useful (check the year and month,
      not just the hour and minute).
    * Fixed the read/write timeouts in the streaming lib (so that it actually
      honors them now)
    * Minor I2PSnark cleanups (no read timeout, more careful shutdown and
      torrent closing)
    * Handle an oddball tunnel creation failure (thanks Xunk)
This commit is contained in:
jrandom
2005-12-27 13:20:50 +00:00
committed by zzz
parent 9b7e5d1817
commit 1d0d0d9c69
11 changed files with 63 additions and 22 deletions

View File

@ -411,15 +411,23 @@ public class Snark
*/
public void stopTorrent() {
stopped = true;
trackerclient.halt();
coordinator.halt();
try {
storage.close();
} catch (IOException ioe) {
System.out.println("Error closing " + torrent);
ioe.printStackTrace();
TrackerClient tc = trackerclient;
if (tc != null)
tc.halt();
PeerCoordinator pc = coordinator;
if (pc != null)
pc.halt();
Storage st = storage;
if (st != null) {
try {
storage.close();
} catch (IOException ioe) {
System.out.println("Error closing " + torrent);
ioe.printStackTrace();
}
}
PeerCoordinatorSet.instance().remove(coordinator);
if (pc != null)
PeerCoordinatorSet.instance().remove(pc);
}
static Snark parseArguments(String[] args)