diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java index 9f7ee865030d8ccb92bacdd1900bac107b9e6706..e5d850399ac138be987ca7a8255219918a6d1861 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java @@ -634,9 +634,11 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable { if (i2ps != null) try { i2ps.close(); } catch (IOException ioe) {} break; } catch (ConnectException ce) { + if (i2ps != null) try { i2ps.close(); } catch (IOException ioe) {} + if (!open) + break; if (_log.shouldLog(Log.ERROR)) _log.error("Error accepting", ce); - if (i2ps != null) try { i2ps.close(); } catch (IOException ioe) {} try { Thread.sleep(2*60*1000); } catch (InterruptedException ie) {}