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

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

fix NPE on delayed open http://forum.i2p/viewtopic.php?t=3189

parent 91b3889c
No related branches found
No related tags found
No related merge requests found
...@@ -185,7 +185,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable ...@@ -185,7 +185,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
/** /**
* create the default options (using the default timeout, etc) * create the default options (using the default timeout, etc)
* * unused?
*/ */
protected I2PSocketOptions getDefaultOptions() { protected I2PSocketOptions getDefaultOptions() {
Properties defaultOpts = getTunnel().getClientOptions(); Properties defaultOpts = getTunnel().getClientOptions();
...@@ -210,6 +210,9 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable ...@@ -210,6 +210,9 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
defaultOpts.setProperty(I2PSocketOptions.PROP_READ_TIMEOUT, ""+DEFAULT_READ_TIMEOUT); defaultOpts.setProperty(I2PSocketOptions.PROP_READ_TIMEOUT, ""+DEFAULT_READ_TIMEOUT);
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
if (sockMgr == null)
sockMgr = getSocketManager();
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);
......
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