I2PSnark: Don't let tunnels start unless we're starting torrents (regression, #766)

This commit is contained in:
dg2-new
2015-07-22 22:05:44 +00:00
parent 35b0e99ff0
commit c20772702a
2 changed files with 3 additions and 3 deletions

View File

@@ -297,7 +297,7 @@ public class Peer implements Comparable<Peer>
if (_log.shouldLog(Log.DEBUG))
_log.debug("Start running the reader with " + toString());
// Use this thread for running the incomming connection.
// Use this thread for running the incoming connection.
// The outgoing connection creates its own Thread.
out.startup();
Thread.currentThread().setName("Snark reader from " + peerID);

View File

@@ -1278,7 +1278,7 @@ public class SnarkManager implements CompleteListener {
running = true;
} else {
running = false;
}
}
// Were we running last time?
if (!dontAutoStart && shouldAutoStart() && running) {
torrent.startTorrent();
@@ -2128,7 +2128,7 @@ public class SnarkManager implements CompleteListener {
try {
// Snark.fatal() throws a RuntimeException
// don't let one bad torrent kill the whole loop
addTorrent(name, null, false);
addTorrent(name, null, !shouldAutoStart());
} catch (Exception e) {
addMessage(_("Error: Could not add the torrent {0}", name) + ": " + e);
_log.error("Unable to add the torrent " + name, e);