forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.zzz.sam' (head 68de14d0053dea374413f9e0419b1c0f7e9ec3af)
to branch 'i2p.i2p' (head 54f5dd288f7c0c5a50f7f63f911aec4008be27e2)
This commit is contained in:
@ -493,6 +493,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
try {
|
||||
I2PSSLSocketFactory fact = new I2PSSLSocketFactory(_context, false, "certificates/i2cp");
|
||||
_socket = fact.createSocket(_hostname, _portNum);
|
||||
_socket.setKeepAlive(true);
|
||||
} catch (GeneralSecurityException gse) {
|
||||
IOException ioe = new IOException("SSL Fail");
|
||||
ioe.initCause(gse);
|
||||
@ -500,6 +501,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
}
|
||||
} else {
|
||||
_socket = new Socket(_hostname, _portNum);
|
||||
_socket.setKeepAlive(true);
|
||||
}
|
||||
// _socket.setSoTimeout(1000000); // Uhmmm we could really-really use a real timeout, and handle it.
|
||||
OutputStream out = _socket.getOutputStream();
|
||||
|
@ -89,6 +89,7 @@ class I2PSimpleSession extends I2PSessionImpl2 {
|
||||
} else {
|
||||
_socket = new Socket(_hostname, _portNum);
|
||||
}
|
||||
_socket.setKeepAlive(true);
|
||||
OutputStream out = _socket.getOutputStream();
|
||||
out.write(I2PClient.PROTOCOL_BYTE);
|
||||
out.flush();
|
||||
|
Reference in New Issue
Block a user