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

Skip to content
Snippets Groups Projects
Commit 7249b643 authored by str4d's avatar str4d
Browse files

Differentiate between constructor invocation failure and connection failure

parent efcf2946
No related branches found
No related tags found
No related merge requests found
......@@ -605,7 +605,11 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
Constructor<?> ctor = clazz.getDeclaredConstructor(I2PAppContext.class);
Object fact = ctor.newInstance(_context);
Method createSocket = clazz.getDeclaredMethod("createSocket", String.class);
_socket = (Socket) createSocket.invoke(fact, _options.getProperty(PROP_DOMAIN_SOCKET));
try {
_socket = (Socket) createSocket.invoke(fact, _options.getProperty(PROP_DOMAIN_SOCKET));
} catch (InvocationTargetException e) {
throw new I2PSessionException("Cannot create domain socket", e);
}
} catch (ClassNotFoundException e) {
throw new I2PSessionException("Cannot load DomainSocketFactory", e);
} catch (NoSuchMethodException e) {
......
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