Changeset 0689b036


Ignore:
Timestamp:
Aug 30, 2012 3:29:35 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
94f370e
Parents:
ee8cd29
Message:
  • Prevent crashes at update caused by event log starting timestamper thread
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/Router.java

    ree8cd29 r0689b036  
    416416        if (_isAlive)
    417417            throw new IllegalStateException();
     418        String last = _config.get("router.previousFullVersion");
     419        if (last != null) {
     420            _eventLog.addEvent(EventLog.UPDATED, "from " + last + " to " + RouterVersion.FULL_VERSION);
     421            saveConfig("router.previousFullVersion", null);
     422        }
    418423        _eventLog.addEvent(EventLog.STARTED, RouterVersion.FULL_VERSION);
    419424        startupStuff();
     
    841846        _watchdog.shutdown();
    842847        _watchdogThread.interrupt();
     848        _eventLog.addEvent(EventLog.STOPPED, Integer.toString(exitCode));
    843849        finalShutdown(exitCode);
    844850    }
     
    877883        }
    878884        _context.getFinalShutdownTasks().clear();
    879         _eventLog.addEvent(EventLog.STOPPED, Integer.toString(exitCode));
    880885
    881886        if (_killVMOnEnd) {
     
    11451150                // Set the last version to the current version, since 0.8.13
    11461151                _config.put("router.previousVersion", RouterVersion.VERSION);
     1152                _config.put("router.previousFullVersion", RouterVersion.FULL_VERSION);
    11471153                saveConfig();
    1148                 _eventLog.addEvent(EventLog.UPDATED);
    11491154                ok = FileUtil.extractZip(updateFile, _context.getBaseDir());
    11501155            }
Note: See TracChangeset for help on using the changeset viewer.