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

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • equincey/i2p.i2p
  • marek/i2p.i2p
  • kytv/i2p.i2p
  • agentoocat/i2p.i2p
  • aargh/i2p.i2p
  • Kalhintz/i2p.i2p
  • longyap/i2p.i2p
  • kelare/i2p.i2p
  • apsoyka/i2p.i2p
  • mesh/i2p.i2p
  • ashtod/i2p.i2p
  • y2kboy23/i2p.i2p
  • Lfrr/i2p.i2p
  • anonymousmaybe/i2p.i2p
  • obscuratus/i2p.i2p
  • zzz/i2p.i2p
  • lbt/i2p.i2p
  • 31337/i2p.i2p
  • DuncanIdaho/i2p.i2p
  • loveisgrief/i2p.i2p
  • i2p-hackers/i2p.i2p
  • thebland/i2p.i2p
  • elde/i2p.i2p
  • echelon/i2p.i2p
  • welshlyluvah1967/i2p.i2p
  • zlatinb/i2p.i2p
  • sadie/i2p.i2p
  • pVT0/i2p.i2p
  • idk/i2p.i2p
29 results
Show changes
Showing
with 1123 additions and 439 deletions
...@@ -30,6 +30,7 @@ import net.i2p.I2PAppContext; ...@@ -30,6 +30,7 @@ import net.i2p.I2PAppContext;
import net.i2p.I2PException; import net.i2p.I2PException;
import net.i2p.client.streaming.I2PServerSocket; import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.RouterRestartException;
import net.i2p.data.Hash; import net.i2p.data.Hash;
import net.i2p.util.I2PAppThread; import net.i2p.util.I2PAppThread;
import net.i2p.util.Log; import net.i2p.util.Log;
...@@ -131,12 +132,13 @@ class ConnectionAcceptor implements Runnable ...@@ -131,12 +132,13 @@ class ConnectionAcceptor implements Runnable
/** /**
* Effectively unused, would only be called if we changed * Effectively unused, would only be called if we changed
* I2CP host/port, which is hidden in the gui if in router context * I2CP host/port, which is hidden in the gui if in router context
* FIXME this only works if already running
*/ */
public synchronized void restart() { public synchronized void restart() {
Thread t = thread; Thread t = thread;
if (t != null) if (t != null)
t.interrupt(); t.interrupt();
else
startAccepting();
} }
public int getPort() public int getPort()
...@@ -201,6 +203,24 @@ class ConnectionAcceptor implements Runnable ...@@ -201,6 +203,24 @@ class ConnectionAcceptor implements Runnable
t.start(); t.start();
} }
} }
catch (RouterRestartException rre) {
if (_log.shouldWarn())
_log.warn("Waiting for router restart", rre);
try {
Thread.sleep(2*60*1000);
} catch (InterruptedException ie) {}
while (true) {
if (_util.connected())
break;
if (_util.connect())
break;
try {
Thread.sleep(60*1000);
} catch (InterruptedException ie) { break; }
}
if (_log.shouldWarn())
_log.warn("Router restarted");
}
catch (I2PException ioe) catch (I2PException ioe)
{ {
int level = stop ? Log.WARN : Log.ERROR; int level = stop ? Log.WARN : Log.ERROR;
......
...@@ -42,15 +42,5 @@ interface CoordinatorListener ...@@ -42,15 +42,5 @@ interface CoordinatorListener
*/ */
public boolean overUploadLimit(int uploaders); public boolean overUploadLimit(int uploaders);
/**
* Is i2psnark as a whole over its limit?
*/
public boolean overUpBWLimit();
/**
* Is a particular peer who has this recent download rate (in Bps) over our upstream bandwidth limit?
*/
public boolean overUpBWLimit(long total);
public void addMessage(String message); public void addMessage(String message);
} }