forked from I2P_Developers/i2p.i2p
i2ptunnel: Retry accept after router soft restart (ticket #2003)
This sends the router restart indication from I2CP router side to client side to streaming to I2PTunnelServer via a new streaming exception.
This commit is contained in:
@@ -30,7 +30,7 @@ class DisconnectMessageHandler extends HandlerImpl {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Handle message " + message);
|
||||
String reason = ((DisconnectMessage)message).getReason();
|
||||
session.propogateError(reason, new I2PSessionException("Disconnect Message received"));
|
||||
session.propogateError(reason, new I2PSessionException("Disconnect Message received: " + reason));
|
||||
session.destroySession(false);
|
||||
if (reason.contains("restart")) {
|
||||
Thread t = new I2PAppThread(new Reconnector(session), "Reconnect " + session, true);
|
||||
@@ -47,7 +47,7 @@ class DisconnectMessageHandler extends HandlerImpl {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
|
||||
try { Thread.sleep(40*1000); } catch (InterruptedException ie) {}
|
||||
_session.reconnect();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user