From 5c28c7f0a40af26b3bf4c44ca473433f2e2e4a46 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 17 Nov 2024 07:11:28 -0500 Subject: [PATCH] Streaming: Reduce batch delay unless slow --- .../net/i2p/client/streaming/impl/MessageOutputStream.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java index 0cd02b6e0..f66a03cfb 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java @@ -11,6 +11,7 @@ import net.i2p.data.ByteArray; import net.i2p.util.ByteCache; import net.i2p.util.Log; import net.i2p.util.SimpleTimer2; +import net.i2p.util.SystemVersion; /** * A stream that we can shove data into that fires off those bytes @@ -50,9 +51,9 @@ class MessageOutputStream extends OutputStream { /** * Since this is less than i2ptunnel's i2p.streaming.connectDelay default of 1000, - * we only wait 250 at the start. Guess that's ok, 1000 is too long anyway. + * we only wait this long at the start. Guess that's ok, 1000 is too long anyway. */ - private static final int DEFAULT_PASSIVE_FLUSH_DELAY = 175; + private static final int DEFAULT_PASSIVE_FLUSH_DELAY = SystemVersion.isSlow() ? 175 : 100; /**** public MessageOutputStream(I2PAppContext ctx, DataReceiver receiver) {