summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/DHT.hs')
-rw-r--r--src/Network/BitTorrent/DHT.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT.hs b/src/Network/BitTorrent/DHT.hs
index a098d339..38de1f91 100644
--- a/src/Network/BitTorrent/DHT.hs
+++ b/src/Network/BitTorrent/DHT.hs
@@ -41,6 +41,7 @@ import Text.PrettyPrint.Class
41import Data.Torrent.InfoHash 41import Data.Torrent.InfoHash
42import Network.BitTorrent.Core 42import Network.BitTorrent.Core
43import Network.BitTorrent.DHT.Message 43import Network.BitTorrent.DHT.Message
44import Network.BitTorrent.DHT.Routing
44import Network.BitTorrent.DHT.Session 45import Network.BitTorrent.DHT.Session
45import Network.KRPC 46import Network.KRPC
46 47
@@ -103,6 +104,8 @@ bootstrap startNodes = do
103 $(logInfoS) "bootstrap" "Node bootstrapping finished" 104 $(logInfoS) "bootstrap" "Node bootstrapping finished"
104 where 105 where
105 insertClosest addr = do 106 insertClosest addr = do
107 t <- getTable
108 unless (full t) $ do
106 nid <- getNodeId 109 nid <- getNodeId
107 result <- try $ FindNode nid <@> addr 110 result <- try $ FindNode nid <@> addr
108 case result of 111 case result of