Changeset cd5d5ee2 for core


Ignore:
Timestamp:
Nov 14, 2016 1:15:36 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1a46d93
Parents:
16a551f7
Message:

Logs: Fix output of dup message after 30 minutes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/LogWriter.java

    r16a551f7 rcd5d5ee2  
    3030    protected volatile boolean _write;
    3131    private LogRecord _last;
     32    private long _firstTimestamp;
    3233    // ms
    3334    private volatile long _flushInterval = FLUSH_INTERVAL;
     
    9697            if (records == null) return;
    9798            if (!records.isEmpty()) {
    98                 if (_last != null && _last.getDate() < _manager.getContext().clock().now() - 30*60*1000)
     99                if (_last != null && _firstTimestamp < _manager.getContext().clock().now() - 30*60*1000)
    99100                    _last = null;
    100101                LogRecord rec;
     
    109110                        }
    110111                        writeRecord(rec);
     112                        _firstTimestamp = rec.getDate();
    111113                    }
    112114                    _last = rec;
Note: See TracChangeset for help on using the changeset viewer.