Changeset 4b19801


Ignore:
Timestamp:
May 20, 2011 2:09:36 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e42b78e
Parents:
e62d9df
Message:

try to prevent out-of-order logging at shutdown

File:
1 edited

Legend:

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

    re62d9df r4b19801  
    665665    public void shutdown() {
    666666        if (_writer != null) {
    667             _log.log(Log.WARN, "Shutting down logger");
     667            //_log.log(Log.WARN, "Shutting down logger");
     668            // try to prevent out-of-order logging at shutdown
     669            synchronized (_writer) {
     670                _writer.notifyAll();
     671            }
     672            if (!_records.isEmpty()) {
     673                try {
     674                    Thread.sleep(250);
     675                } catch (InterruptedException ie) {}
     676            }
     677            // this could generate out-of-order messages
    668678            _writer.flushRecords(false);
    669679            _writer.stopWriting();
Note: See TracChangeset for help on using the changeset viewer.