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!)
This commit is contained in:
jrandom
2004-12-07 01:09:16 +00:00
committed by zzz
parent acfb6c4578
commit fa12dc867f
4 changed files with 13 additions and 4 deletions

View File

@ -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 */