forked from I2P_Developers/i2p.i2p
* 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:
@@ -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);
|
||||
|
@@ -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+"\"");
|
||||
|
Reference in New Issue
Block a user