fix shutdown while I2P router is initializing

dbus-notify
Zlatin Balevsky 2022-04-12 08:08:41 +01:00
parent b8efa9b29f
commit 77833e7f76
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 4 additions and 6 deletions

View File

@ -62,10 +62,8 @@ class I2PConnector {
}
}
synchronized void shutdown() {
if (socketManager == null)
return
socketManager.destroySocketManager()
void shutdown() {
socketManager?.destroySocketManager()
socketManager = null
}

View File

@ -300,8 +300,8 @@ class H2HostCache extends HostCache {
}
@Override
public synchronized void stop() {
timer.cancel()
sql.close()
try {timer.cancel()} catch (Exception ignore) {}
sql?.close()
}
@Override
public synchronized void load() {