* SAM: Force i2cp.messageReliability=None (ticket #819)

This commit is contained in:
zzz
2013-01-12 18:13:59 +00:00
parent 95b4fe7378
commit 832c0ff683
2 changed files with 11 additions and 1 deletions

View File

@ -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")) {

View File

@ -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();