From fa12dc867fb2b42bfcba865edf5b9bde2d917f5c Mon Sep 17 00:00:00 2001 From: jrandom Date: Tue, 7 Dec 2004 01:09:16 +0000 Subject: [PATCH] 2004-12-06 jrandom * Don't do a 'passive flush' while there are already outbound messages unacked. * Show the reseed link if up to 10 peers profiles are active (thanks dburton!) --- apps/routerconsole/jsp/summary.jsp | 2 +- .../src/net/i2p/client/streaming/MessageOutputStream.java | 3 +++ history.txt | 8 +++++++- router/java/src/net/i2p/router/RouterVersion.java | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/routerconsole/jsp/summary.jsp b/apps/routerconsole/jsp/summary.jsp index aedbf44fe..e6ea3d76b 100644 --- a/apps/routerconsole/jsp/summary.jsp +++ b/apps/routerconsole/jsp/summary.jsp @@ -23,7 +23,7 @@ if (helper.getActivePeers() <= 0) { %>check your NAT/firewall
<% } - if (helper.getActiveProfiles() <= 4) { // 4 is the min fallback + if (helper.getActiveProfiles() <= 10) { // 10 is the min fallback if ("true".equals(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress", "false"))) { out.print(" reseeding"); } else { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java index d6a9f3884..825ce93a1 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java @@ -160,6 +160,8 @@ public class MessageOutputStream extends OutputStream { _log.debug("flusher time reached: left = " + timeLeft); if (timeLeft > 0) enqueue(); + else if (_dataReceiver.writeInProcess()) + enqueue(); // don't passive flush if there is a write being done (unacked outbound) else doFlush(); } @@ -341,6 +343,7 @@ public class MessageOutputStream extends OutputStream { * Nonblocking write */ public WriteStatus writeData(byte buf[], int off, int size); + public boolean writeInProcess(); } /** Define a way to detect the status of a write */ diff --git a/history.txt b/history.txt index 426dc0f3d..25bf981e4 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,10 @@ -$Id: history.txt,v 1.98 2004/12/05 21:08:03 jrandom Exp $ +$Id: history.txt,v 1.99 2004/12/06 00:03:58 jrandom Exp $ + +2004-12-06 jrandom + * Don't do a 'passive flush' while there are already outbound messages + unacked. + * Show the reseed link if up to 10 peers profiles are active (thanks + dburton!) 2004-12-06 jrandom * Don't propogate streaming connection failures out to the SAM bridge as diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 9683ef1c8..1c719e509 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.103 $ $Date: 2004/12/05 21:08:02 $"; + public final static String ID = "$Revision: 1.104 $ $Date: 2004/12/06 00:03:57 $"; public final static String VERSION = "0.4.2.2"; - public final static long BUILD = 7; + public final static long BUILD = 8; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION); System.out.println("Router ID: " + RouterVersion.ID);