I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit e29e3e2f authored by zzz's avatar zzz
Browse files

Test: Prevent NPE in LocalClientManager test on client shutdown

parent e01c443f
No related branches found
No related tags found
No related merge requests found
......@@ -199,12 +199,15 @@ class ClientConnectionRunner {
if (_sessionKeyManager != null)
_sessionKeyManager.shutdown();
_manager.unregisterConnection(this);
for (SessionParams sp : _sessions.values()) {
LeaseSet ls = sp.currentLeaseSet;
if (ls != null)
_context.netDb().unpublish(ls);
if (!sp.isPrimary)
_context.tunnelManager().removeAlias(sp.dest);
// netdb may be null in unit tests
if (_context.netDb() != null) {
for (SessionParams sp : _sessions.values()) {
LeaseSet ls = sp.currentLeaseSet;
if (ls != null)
_context.netDb().unpublish(ls);
if (!sp.isPrimary)
_context.tunnelManager().removeAlias(sp.dest);
}
}
synchronized (_alreadyProcessed) {
_alreadyProcessed.clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment