forked from I2P_Developers/i2p.i2p
* SAM: Force i2cp.messageReliability=None (ticket #819)
This commit is contained in:
@ -21,6 +21,7 @@ import java.util.Properties;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.data.DataFormatException;
|
||||
@ -253,6 +254,11 @@ public class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatag
|
||||
}
|
||||
props.remove("STYLE");
|
||||
|
||||
// Unconditionally override what the client may have set
|
||||
// (iMule sets BestEffort) as None is more efficient
|
||||
// and the client has no way to access delivery notifications
|
||||
props.setProperty(I2PClient.PROP_RELIABILITY, I2PClient.PROP_RELIABILITY_NONE);
|
||||
|
||||
if (style.equals("RAW")) {
|
||||
rawSession = new SAMRawSession(destKeystream, props, this);
|
||||
} else if (style.equals("DATAGRAM")) {
|
||||
|
@ -26,6 +26,7 @@ import java.util.HashMap;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.data.DataFormatException;
|
||||
@ -514,7 +515,10 @@ public class SAMv3Handler extends SAMv1Handler
|
||||
}
|
||||
props.remove("STYLE");
|
||||
|
||||
|
||||
// Unconditionally override what the client may have set
|
||||
// (iMule sets BestEffort) as None is more efficient
|
||||
// and the client has no way to access delivery notifications
|
||||
i2cpProps.setProperty(I2PClient.PROP_RELIABILITY, I2PClient.PROP_RELIABILITY_NONE);
|
||||
|
||||
// Record the session in the database sSessionsHash
|
||||
Properties allProps = new Properties();
|
||||
|
Reference in New Issue
Block a user