forked from I2P_Developers/i2p.i2p
from last checkin - fix enforce proto default, fix http client delayed start
This commit is contained in:
@ -238,6 +238,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
|
|||||||
}
|
}
|
||||||
//if (!defaultOpts.contains("i2p.streaming.inactivityTimeout"))
|
//if (!defaultOpts.contains("i2p.streaming.inactivityTimeout"))
|
||||||
// defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
|
// defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
|
||||||
|
// delayed start
|
||||||
|
verifySocketManager();
|
||||||
I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
|
I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
|
||||||
if(!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT)) {
|
if(!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT)) {
|
||||||
opts.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
|
opts.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
|
||||||
@ -969,13 +971,12 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Properties opts = new Properties();
|
Properties opts = new Properties();
|
||||||
//opts.setProperty("i2p.streaming.inactivityTimeout", ""+120*1000);
|
//opts.setProperty("i2p.streaming.inactivityTimeout", ""+120*1000);
|
||||||
// 1 == disconnect. see ConnectionOptions in the new streaming lib, which i
|
// 1 == disconnect. see ConnectionOptions in the new streaming lib, which i
|
||||||
// dont want to hard link to here
|
// dont want to hard link to here
|
||||||
//opts.setProperty("i2p.streaming.inactivityTimeoutAction", ""+1);
|
//opts.setProperty("i2p.streaming.inactivityTimeoutAction", ""+1);
|
||||||
//I2PSocketOptions sktOpts = getDefaultOptions(opts);
|
I2PSocketOptions sktOpts = getDefaultOptions(opts);
|
||||||
I2PSocketOptions sktOpts = getDefaultOptions();
|
|
||||||
if (remotePort > 0)
|
if (remotePort > 0)
|
||||||
sktOpts.setPort(remotePort);
|
sktOpts.setPort(remotePort);
|
||||||
I2PSocket i2ps = createI2PSocket(clientDest, sktOpts);
|
I2PSocket i2ps = createI2PSocket(clientDest, sktOpts);
|
||||||
|
@ -102,7 +102,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl {
|
|||||||
* If PROTO is enforced, we cannot communicate with destinations earlier than version 0.7.1.
|
* If PROTO is enforced, we cannot communicate with destinations earlier than version 0.7.1.
|
||||||
* @since 0.9.1
|
* @since 0.9.1
|
||||||
*/
|
*/
|
||||||
private static final boolean DEFAULT_ENFORCE_PROTO = true;
|
private static final boolean DEFAULT_ENFORCE_PROTO = false;
|
||||||
|
|
||||||
// Syncronization fix, but doing it this way causes NPE...
|
// Syncronization fix, but doing it this way causes NPE...
|
||||||
// FIXME private final int _trend[] = new int[TREND_COUNT]; FIXME
|
// FIXME private final int _trend[] = new int[TREND_COUNT]; FIXME
|
||||||
|
Reference in New Issue
Block a user