mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Removed an unnecessary variable.
This commit is contained in:
@@ -46,9 +46,6 @@ class KeyManagerImpl extends TimerTask implements KeyManager, DatabaseListener {
|
|||||||
// Locking: this
|
// Locking: this
|
||||||
private final Map<ContactTransportKey, TemporarySecret> incomingNew;
|
private final Map<ContactTransportKey, TemporarySecret> incomingNew;
|
||||||
|
|
||||||
// Locking: this
|
|
||||||
private boolean running = false;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public KeyManagerImpl(CryptoComponent crypto, DatabaseComponent db,
|
public KeyManagerImpl(CryptoComponent crypto, DatabaseComponent db,
|
||||||
ConnectionRecogniser recogniser) {
|
ConnectionRecogniser recogniser) {
|
||||||
@@ -62,7 +59,6 @@ class KeyManagerImpl extends TimerTask implements KeyManager, DatabaseListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized boolean start() {
|
public synchronized boolean start() {
|
||||||
if(running) return false;
|
|
||||||
Collection<TemporarySecret> secrets;
|
Collection<TemporarySecret> secrets;
|
||||||
try {
|
try {
|
||||||
secrets = db.getSecrets();
|
secrets = db.getSecrets();
|
||||||
@@ -89,7 +85,6 @@ class KeyManagerImpl extends TimerTask implements KeyManager, DatabaseListener {
|
|||||||
for(TemporarySecret s : incomingNew.values()) recogniser.addSecret(s);
|
for(TemporarySecret s : incomingNew.values()) recogniser.addSecret(s);
|
||||||
// Schedule periodic key rotation
|
// Schedule periodic key rotation
|
||||||
timer.scheduleAtFixedRate(this, MS_BETWEEN_CHECKS, MS_BETWEEN_CHECKS);
|
timer.scheduleAtFixedRate(this, MS_BETWEEN_CHECKS, MS_BETWEEN_CHECKS);
|
||||||
running = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,13 +191,11 @@ class KeyManagerImpl extends TimerTask implements KeyManager, DatabaseListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void stop() {
|
public synchronized void stop() {
|
||||||
if(!running) return;
|
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
recogniser.removeSecrets();
|
recogniser.removeSecrets();
|
||||||
removeAndEraseSecrets(outgoing);
|
removeAndEraseSecrets(outgoing);
|
||||||
removeAndEraseSecrets(incomingOld);
|
removeAndEraseSecrets(incomingOld);
|
||||||
removeAndEraseSecrets(incomingNew);
|
removeAndEraseSecrets(incomingNew);
|
||||||
running = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Locking: this
|
// Locking: this
|
||||||
|
|||||||
Reference in New Issue
Block a user