diff options
Diffstat (limited to 'dht/src')
-rw-r--r-- | dht/src/Network/BitTorrent/MainlineDHT.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dht/src/Network/BitTorrent/MainlineDHT.hs b/dht/src/Network/BitTorrent/MainlineDHT.hs index af618ba4..2ea2551e 100644 --- a/dht/src/Network/BitTorrent/MainlineDHT.hs +++ b/dht/src/Network/BitTorrent/MainlineDHT.hs | |||
@@ -659,13 +659,14 @@ newClient swarms addr = do | |||
659 | refresh_thread4 <- forkPollForRefresh $ refresher4 routing | 659 | refresh_thread4 <- forkPollForRefresh $ refresher4 routing |
660 | refresh_thread6 <- forkPollForRefresh $ refresher6 routing | 660 | refresh_thread6 <- forkPollForRefresh $ refresher6 routing |
661 | 661 | ||
662 | forkAnnouncedInfohashesGC (contactInfo swarms) | 662 | gc_peers <- forkAnnouncedInfohashesGC (contactInfo swarms) |
663 | 663 | ||
664 | return (client, routing, bootstrap (refresher4 routing), bootstrap (refresher6 routing) | 664 | return (client, routing, bootstrap (refresher4 routing), bootstrap (refresher6 routing) |
665 | , do killThread refresh_thread4 -- TODO: Better termination mechanism. | 665 | , do killThread refresh_thread4 -- TODO: Better termination mechanism. |
666 | killThread refresh_thread6 -- TODO: Better termination mechanism. | 666 | killThread refresh_thread6 -- TODO: Better termination mechanism. |
667 | atomically $ writeTChan addr4 Nothing -- Terminate "addr4" thread. | 667 | atomically $ writeTChan addr4 Nothing -- Terminate "addr4" thread. |
668 | atomically $ writeTChan addr6 Nothing -- Terminate "addr6" thread. | 668 | atomically $ writeTChan addr6 Nothing -- Terminate "addr6" thread. |
669 | killThread gc_peers | ||
669 | ) | 670 | ) |
670 | 671 | ||
671 | -- Note that you should call .put() every hour for content that you want to | 672 | -- Note that you should call .put() every hour for content that you want to |