I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c2077270 authored by dg2-new's avatar dg2-new
Browse files

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

parent 35b0e99f
No related branches found
No related tags found
No related merge requests found
...@@ -297,7 +297,7 @@ public class Peer implements Comparable<Peer> ...@@ -297,7 +297,7 @@ public class Peer implements Comparable<Peer>
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Start running the reader with " + toString()); _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. // The outgoing connection creates its own Thread.
out.startup(); out.startup();
Thread.currentThread().setName("Snark reader from " + peerID); Thread.currentThread().setName("Snark reader from " + peerID);
......
...@@ -1278,7 +1278,7 @@ public class SnarkManager implements CompleteListener { ...@@ -1278,7 +1278,7 @@ public class SnarkManager implements CompleteListener {
running = true; running = true;
} else { } else {
running = false; running = false;
} }
// Were we running last time? // Were we running last time?
if (!dontAutoStart && shouldAutoStart() && running) { if (!dontAutoStart && shouldAutoStart() && running) {
torrent.startTorrent(); torrent.startTorrent();
...@@ -2128,7 +2128,7 @@ public class SnarkManager implements CompleteListener { ...@@ -2128,7 +2128,7 @@ public class SnarkManager implements CompleteListener {
try { try {
// Snark.fatal() throws a RuntimeException // Snark.fatal() throws a RuntimeException
// don't let one bad torrent kill the whole loop // don't let one bad torrent kill the whole loop
addTorrent(name, null, false); addTorrent(name, null, !shouldAutoStart());
} catch (Exception e) { } catch (Exception e) {
addMessage(_("Error: Could not add the torrent {0}", name) + ": " + e); addMessage(_("Error: Could not add the torrent {0}", name) + ": " + e);
_log.error("Unable to add the torrent " + name, e); _log.error("Unable to add the torrent " + name, e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment