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

Skip to content
Snippets Groups Projects
Commit 72ed1bc1 authored by zzz's avatar zzz
Browse files

fixups after prop

parent 4a1b8396
No related branches found
No related tags found
No related merge requests found
...@@ -923,7 +923,7 @@ public class ConsoleUpdateManager implements UpdateManager { ...@@ -923,7 +923,7 @@ public class ConsoleUpdateManager implements UpdateManager {
private void finishStatus(String msg) { private void finishStatus(String msg) {
updateStatus(msg); updateStatus(msg);
SimpleScheduler.getInstance().addEvent(new Cleaner(msg), 20*60*1000); _context.simpleScheduler().addEvent(new Cleaner(msg), 20*60*1000);
} }
private class Cleaner implements SimpleTimer.TimedEvent { private class Cleaner implements SimpleTimer.TimedEvent {
......
...@@ -61,7 +61,7 @@ class PluginUpdateChecker extends UpdateRunner { ...@@ -61,7 +61,7 @@ class PluginUpdateChecker extends UpdateRunner {
try { try {
_get = new PartialEepGet(_context, proxyHost, proxyPort, _baos, _currentURI.toString(), TrustedUpdate.HEADER_BYTES); _get = new PartialEepGet(_context, proxyHost, proxyPort, _baos, _currentURI.toString(), TrustedUpdate.HEADER_BYTES);
_get.addStatusListener(this); _get.addStatusListener(this);
_get.fetch(); _get.fetch(CONNECT_TIMEOUT);
} catch (Throwable t) { } catch (Throwable t) {
_log.error("Error checking update for plugin", t); _log.error("Error checking update for plugin", t);
} }
......
...@@ -105,7 +105,7 @@ class PluginUpdateRunner extends UpdateRunner { ...@@ -105,7 +105,7 @@ class PluginUpdateRunner extends UpdateRunner {
else else
_get = new EepGet(_context, 1, _updateFile, _xpi2pURL, false); _get = new EepGet(_context, 1, _updateFile, _xpi2pURL, false);
_get.addStatusListener(PluginUpdateRunner.this); _get.addStatusListener(PluginUpdateRunner.this);
_get.fetch(); _get.fetch(CONNECT_TIMEOUT, -1, shouldProxy ? INACTIVITY_TIMEOUT : NOPROXY_INACTIVITY_TIMEOUT);
} catch (Throwable t) { } catch (Throwable t) {
_log.error("Error downloading plugin", t); _log.error("Error downloading plugin", t);
} }
......
...@@ -45,6 +45,10 @@ class UpdateRunner extends I2PAppThread implements UpdateTask, EepGet.StatusList ...@@ -45,6 +45,10 @@ class UpdateRunner extends I2PAppThread implements UpdateTask, EepGet.StatusList
private static final String SIGNED_UPDATE_FILE = "i2pupdate.sud"; private static final String SIGNED_UPDATE_FILE = "i2pupdate.sud";
protected static final long CONNECT_TIMEOUT = 55*1000;
protected static final long INACTIVITY_TIMEOUT = 5*60*1000;
protected static final long NOPROXY_INACTIVITY_TIMEOUT = 60*1000;
public UpdateRunner(RouterContext ctx, List<URI> uris) { public UpdateRunner(RouterContext ctx, List<URI> uris) {
super("Update Runner"); super("Update Runner");
setDaemon(true); setDaemon(true);
...@@ -127,7 +131,7 @@ class UpdateRunner extends I2PAppThread implements UpdateTask, EepGet.StatusList ...@@ -127,7 +131,7 @@ class UpdateRunner extends I2PAppThread implements UpdateTask, EepGet.StatusList
// no retries // no retries
_get = new PartialEepGet(_context, proxyHost, proxyPort, baos, updateURL, TrustedUpdate.HEADER_BYTES); _get = new PartialEepGet(_context, proxyHost, proxyPort, baos, updateURL, TrustedUpdate.HEADER_BYTES);
_get.addStatusListener(UpdateRunner.this); _get.addStatusListener(UpdateRunner.this);
_get.fetch(); _get.fetch(CONNECT_TIMEOUT);
} catch (Throwable t) { } catch (Throwable t) {
} }
_isPartial = false; _isPartial = false;
...@@ -143,7 +147,7 @@ class UpdateRunner extends I2PAppThread implements UpdateTask, EepGet.StatusList ...@@ -143,7 +147,7 @@ class UpdateRunner extends I2PAppThread implements UpdateTask, EepGet.StatusList
else else
_get = new EepGet(_context, 1, _updateFile, updateURL, false); _get = new EepGet(_context, 1, _updateFile, updateURL, false);
_get.addStatusListener(UpdateRunner.this); _get.addStatusListener(UpdateRunner.this);
_get.fetch(); _get.fetch(CONNECT_TIMEOUT, -1, shouldProxy ? INACTIVITY_TIMEOUT : NOPROXY_INACTIVITY_TIMEOUT);
} catch (Throwable t) { } catch (Throwable t) {
_log.error("Error updating", t); _log.error("Error updating", t);
} }
......
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