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

Skip to content
Snippets Groups Projects
Commit 5785f500 authored by zzz's avatar zzz
Browse files

complete regenerate-dest-on-reconnect

parent 8f5257d5
No related branches found
No related tags found
No related merge requests found
......@@ -355,6 +355,16 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
public I2PSocket createI2PSocket(Destination dest, I2PSocketOptions opt) throws I2PException, ConnectException, NoRouteToHostException, InterruptedIOException {
I2PSocket i2ps;
if (Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.newDestOnResume")).booleanValue()) {
synchronized(sockMgr) {
I2PSocketManager oldSockMgr = sockMgr;
// This will build a new socket manager and a new dest if the session is closed.
sockMgr = getSocketManager();
if (oldSockMgr != sockMgr) {
_log.error("Built a new destination on resume");
}
}
} // else the old socket manager will reconnect the old session if necessary
i2ps = sockMgr.connect(dest, opt);
synchronized (sockLock) {
mySockets.add(i2ps);
......
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