From 5628342c58f48ca09d9e2a342d9a84a55970d67a Mon Sep 17 00:00:00 2001
From: akwizgran <michael@briarproject.org>
Date: Wed, 24 Oct 2012 19:16:26 +0100
Subject: [PATCH] Cancel the timer thread when stopping the key manager.

---
 components/net/sf/briar/transport/KeyManagerImpl.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/components/net/sf/briar/transport/KeyManagerImpl.java b/components/net/sf/briar/transport/KeyManagerImpl.java
index 20f8158cbd..7aa38d5d51 100644
--- a/components/net/sf/briar/transport/KeyManagerImpl.java
+++ b/components/net/sf/briar/transport/KeyManagerImpl.java
@@ -196,6 +196,7 @@ class KeyManagerImpl extends TimerTask implements KeyManager, DatabaseListener {
 
 	public synchronized void stop() {
 		if(!running) return;
+		timer.cancel();
 		recogniser.removeSecrets();
 		removeAndEraseSecrets(outgoing);
 		removeAndEraseSecrets(incomingOld);
-- 
GitLab