mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 06:32:32 +00:00
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:
1 parent
acebd2ea68
commit
826d8ca07f
10 files changed
+71
-10
No files matched your search
@@ -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