* IRC Client: Don't flush output unless out of input, so the

streaming messages don't get split up unnecessarily
This commit is contained in:
zzz
2012-06-21 21:16:54 +00:00
parent 829e3f47ff
commit 2a8adcb89a
3 changed files with 7 additions and 2 deletions

View File

@@ -79,7 +79,8 @@ public class IrcInboundFilter implements Runnable {
outmsg=outmsg+"\r\n"; // rfc1459 sec. 2.3
output.write(outmsg.getBytes("ISO-8859-1"));
// probably doesn't do much but can't hurt
output.flush();
if (!in.ready())
output.flush();
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("inbound BLOCKED: "+inmsg);

View File

@@ -79,7 +79,9 @@ public class IrcOutboundFilter implements Runnable {
outmsg=outmsg+"\r\n"; // rfc1459 sec. 2.3
output.write(outmsg.getBytes("ISO-8859-1"));
// save 250 ms in streaming
output.flush();
// Check ready() so we don't split the initial handshake up into multiple streaming messages
if (!in.ready())
output.flush();
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("outbound BLOCKED: "+"\""+inmsg+"\"");

View File

@@ -1,6 +1,8 @@
2012-06-21 zzz
* I2CP: Make separate message ID counters per-destination, use atomic,
increase max (could have caused "local loopback" problems)
* IRC Client: Don't flush output unless out of input, so the
streaming messages don't get split up unnecessarily
* OCMOSJ, ElG, Streaming: log tweaks
* TunnelInfo: Change msg counter from long to int
* TunnelPool: Fix bug where a tunnel was marked as reused when it wasn't