I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit cf7efcad authored by zzz's avatar zzz
Browse files

I2CP: Soft restart fixes part 3

Remove low-level I2CP reconnector
as it may result in duplicate destinations after
higher-level (i2ptunnel) or application-layer reconnections
Root cause identified by BiglyBT
Gitlab issue #350
parent dda25bf1
No related branches found
No related tags found
No related merge requests found
......@@ -32,23 +32,7 @@ class DisconnectMessageHandler extends HandlerImpl {
String reason = ((DisconnectMessage)message).getReason();
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);
t.start();
}
}
/** @since 0.8.8 */
private static class Reconnector implements Runnable {
private final I2PSessionImpl _session;
public Reconnector(I2PSessionImpl session) {
_session = session;
}
public void run() {
try { Thread.sleep(40*1000); } catch (InterruptedException ie) {}
_session.reconnect();
}
// Higher layers (only) must do the reconnect, to prevent dup destinations
//if (reason.contains("restart")) ...
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment