]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_dht_Khashmir/actions.py
Added a shutdown method to the khasmir DHT.
[quix0rs-apt-p2p.git] / apt_dht_Khashmir / actions.py
index a3a6fc84e5d6ac1f836a4fd9deb1984790c58a75..088bc0f2a6476b1a59643c681fbc3304f87d7940 100644 (file)
@@ -271,3 +271,9 @@ class KeyExpirer:
         s = "delete from kv where time < '%s';" % self.cut
         c.execute(s)
         self.next_expire = reactor.callLater(self.config['KE_DELAY'], self.doExpire)
+        
+    def shutdown(self):
+        try:
+            self.next_expire.cancel()
+        except:
+            pass