forked from I2P_Developers/i2p.i2p
i2psnark: Fix autostart to start only torrents running previously,
save torrent running status on torrent stop when autostart is enabled, remove dup call to startTorrent() (ticket #2120)
This commit is contained in:
@@ -648,7 +648,10 @@ public class Snark
|
||||
// TODO: Cache the config-in-mem to compare vs config-on-disk
|
||||
// (needed for auto-save to not double-save in some cases)
|
||||
long nowUploaded = getUploaded();
|
||||
boolean changed = storage.isChanged() || nowUploaded != savedUploaded;
|
||||
// If autoStart is enabled, always save the config, so we know
|
||||
// whether to start it up next time
|
||||
boolean changed = storage.isChanged() || nowUploaded != savedUploaded ||
|
||||
(completeListener != null && completeListener.shouldAutoStart());
|
||||
try {
|
||||
storage.close();
|
||||
} catch (IOException ioe) {
|
||||
|
||||
Reference in New Issue
Block a user