diff --git a/components/net/sf/briar/transport/KeyManagerImpl.java b/components/net/sf/briar/transport/KeyManagerImpl.java
index 20f8158cbd7a4ae8fdb9386aca7d231448fad7a0..7aa38d5d517a1abfcbca73da392f4ab223bfdf1d 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);