diff options
author | joe <joe@jerkface.net> | 2018-06-09 01:31:23 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-06-09 01:32:08 -0400 |
commit | fb0c6758ec415c5cda5cc7c182e1f83906f365fb (patch) | |
tree | c07aa47ca461d90199b63af230f4433da9827935 /src/Network/Tox.hs | |
parent | fa15dabe75703516c7bbb54fdba2a13ae6c6e9cc (diff) |
Expire old tox key announcements after 5 minutes.
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r-- | src/Network/Tox.hs | 5 |
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 | |||
19 | import Control.Exception hiding (Handler) | 19 | import Control.Exception hiding (Handler) |
20 | import Control.Applicative | 20 | import Control.Applicative |
21 | import Control.Arrow | 21 | import Control.Arrow |
22 | import Control.Concurrent (MVar) | 22 | import Control.Concurrent (MVar,killThread) |
23 | import Control.Concurrent.STM | 23 | import Control.Concurrent.STM |
24 | import Control.Monad | 24 | import Control.Monad |
25 | import Control.Monad.Fix | 25 | import 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 | ) |