forked from I2P_Developers/i2p.i2p
I2PSnark: Don't let tunnels start unless we're starting torrents (regression, #766)
This commit is contained in:
@@ -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 {
|
|||||||
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 {
|
|||||||
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);
|
||||||
|
Reference in New Issue
Block a user