2005-02-07 jrandom

* Fixed a race in the streaming lib's delayed flush algorithm (thanks anon!)
This commit is contained in:
jrandom authored and zzz committed 2005-02-07 10:04:23 +00:00
1 parent 27e92653fe
commit b366a4b942
3 files changed
+7 -4

No files matched your search

@@ -198,7 +198,7 @@ public class MessageOutputStream extends OutputStream {
WriteStatus ws = null;
synchronized (_dataLock) {
long flushTime = _lastBuffered + _passiveFlushDelay;
if ( (_valid > 0) && (flushTime < _context.clock().now()) ) {
if ( (_valid > 0) && (flushTime <= _context.clock().now()) ) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("doFlush() valid = " + _valid);
if ( (_buf != null) && (_dataReceiver != null) ) {