forked from I2P_Developers/i2p.i2p
2007-01-28 zzz
* i2psnark: Don't hold sendQueue lock while flushing output, to make everything run smoother
This commit is contained in:
@ -72,6 +72,16 @@ class PeerConnectionOut implements Runnable
|
||||
{
|
||||
Message m = null;
|
||||
PeerState state = null;
|
||||
boolean shouldFlush;
|
||||
synchronized(sendQueue)
|
||||
{
|
||||
shouldFlush = !quit && peer.isConnected() && sendQueue.isEmpty();
|
||||
}
|
||||
if (shouldFlush)
|
||||
// Make sure everything will reach the other side.
|
||||
// flush while not holding lock, could take a long time
|
||||
dout.flush();
|
||||
|
||||
synchronized(sendQueue)
|
||||
{
|
||||
while (!quit && peer.isConnected() && sendQueue.isEmpty())
|
||||
@ -79,7 +89,8 @@ class PeerConnectionOut implements Runnable
|
||||
try
|
||||
{
|
||||
// Make sure everything will reach the other side.
|
||||
dout.flush();
|
||||
// don't flush while holding lock, could take a long time
|
||||
// dout.flush();
|
||||
|
||||
// Wait till more data arrives.
|
||||
sendQueue.wait(60*1000);
|
||||
|
@ -1,4 +1,8 @@
|
||||
$Id: history.txt,v 1.544 2007-01-20 22:49:41 complication Exp $
|
||||
$Id: history.txt,v 1.545 2007-01-27 21:30:07 zzz Exp $
|
||||
|
||||
2007-01-28 zzz
|
||||
* i2psnark: Don't hold sendQueue lock while flushing output,
|
||||
to make everything run smoother
|
||||
|
||||
2007-01-27 zzz
|
||||
* i2psnark: Fix orphaned Snark reader tasks leading to OOMs
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.480 $ $Date: 2007-01-20 22:49:41 $";
|
||||
public final static String ID = "$Revision: 1.481 $ $Date: 2007-01-27 21:30:05 $";
|
||||
public final static String VERSION = "0.6.1.26";
|
||||
public final static long BUILD = 14;
|
||||
public final static long BUILD = 15;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
Reference in New Issue
Block a user