the vast majority of messages on the live net are under 2KB

This commit is contained in:
jrandom
2004-07-25 23:40:08 +00:00
committed by zzz
parent 476e23db5b
commit 65d85f7479

View File

@ -393,7 +393,7 @@ class TCPConnection implements I2NPMessageReader.I2NPMessageEventListener {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Message received from " + _remoteIdentity.getHash().toBase64());
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream(32*1024);
ByteArrayOutputStream baos = new ByteArrayOutputStream(2*1024);
message.writeBytes(baos);
int size = baos.size();
// this is called by the I2NPMessageReader's thread, so it delays the reading from this peer only