* I2PTunnel: Fix standalone server tunnels

http://forum.i2p/viewtopic.php?t=5376
This commit is contained in:
zzz
2011-02-19 17:36:37 +00:00
parent 72692840a7
commit fde7b21ca4
3 changed files with 10 additions and 3 deletions

View File

@ -210,7 +210,9 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
*
*/
public void startRunning() {
Thread t = new I2PAppThread(this, "Server " + remoteHost + ':' + remotePort, true);
// prevent JVM exit when running outside the router
boolean isDaemon = getTunnel().getContext().isRouterContext();
Thread t = new I2PAppThread(this, "Server " + remoteHost + ':' + remotePort, isDaemon);
t.start();
}