diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java index 9203f58d17c3b8614fc241801631f0c04f6273a5..e8112ad18589d1fedffa8b7449ef81b2cef63861 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java @@ -449,10 +449,18 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable { _log.error("Error accepting", ce); // not killing the server.. try { - Thread.currentThread().sleep(500); + Thread.sleep(500); } catch (InterruptedException ie) {} } catch(SocketTimeoutException ste) { // ignored, we never set the timeout + } catch (Exception e) { + // streaming borkage + if (_log.shouldLog(Log.ERROR)) + _log.error("Uncaught exception accepting", e); + // not killing the server.. + try { + Thread.sleep(500); + } catch (InterruptedException ie) {} } } if (_executor != null)