summaryrefslogtreecommitdiff
path: root/src/Network/Tox.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-06-09 01:31:23 -0400
committerjoe <joe@jerkface.net>2018-06-09 01:32:08 -0400
commitfb0c6758ec415c5cda5cc7c182e1f83906f365fb (patch)
treec07aa47ca461d90199b63af230f4433da9827935 /src/Network/Tox.hs
parentfa15dabe75703516c7bbb54fdba2a13ae6c6e9cc (diff)
Expire old tox key announcements after 5 minutes.
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r--src/Network/Tox.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index 634b0db1..3c3bce49 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -19,7 +19,7 @@ import Debug.Trace
19import Control.Exception hiding (Handler) 19import Control.Exception hiding (Handler)
20import Control.Applicative 20import Control.Applicative
21import Control.Arrow 21import Control.Arrow
22import Control.Concurrent (MVar) 22import Control.Concurrent (MVar,killThread)
23import Control.Concurrent.STM 23import Control.Concurrent.STM
24import Control.Monad 24import Control.Monad
25import Control.Monad.Fix 25import Control.Monad.Fix
@@ -485,7 +485,8 @@ forkTox tox = do
485 quit <- forkListener "toxCrypto" (toxCrypto tox) 485 quit <- forkListener "toxCrypto" (toxCrypto tox)
486 forkPollForRefresh (DHT.refresher4 $ toxRouting tox) 486 forkPollForRefresh (DHT.refresher4 $ toxRouting tox)
487 forkPollForRefresh (DHT.refresher6 $ toxRouting tox) 487 forkPollForRefresh (DHT.refresher6 $ toxRouting tox)
488 return ( quit 488 keygc <- Onion.forkAnnouncedKeysGC (toxAnnouncedKeys tox)
489 return ( killThread keygc >> quit
489 , bootstrap (DHT.refresher4 $ toxRouting tox) 490 , bootstrap (DHT.refresher4 $ toxRouting tox)
490 , bootstrap (DHT.refresher6 $ toxRouting tox) 491 , bootstrap (DHT.refresher6 $ toxRouting tox)
491 ) 492 )