i2psnark: Fix infinite loop stopping update torrent (ticket #2125)

This commit is contained in:
zzz
2018-01-10 17:58:50 +00:00
parent 541dae36d4
commit 8d6d1bc751

View File

@ -186,7 +186,9 @@ class UpdateRunner implements UpdateTask, CompleteListener {
private void fatal(String error) { private void fatal(String error) {
if (_snark != null) { if (_snark != null) {
if (_hasMetaInfo) { if (_hasMetaInfo) {
_smgr.stopTorrent(_snark, true); // avoid loop stopTorrent() ... updateStatus() ... fatal() ...
if (!_snark.isStopped())
_smgr.stopTorrent(_snark, true);
String file = _snark.getName(); String file = _snark.getName();
_smgr.removeTorrent(file); _smgr.removeTorrent(file);
// delete torrent file // delete torrent file