summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index 263b88ac..a4f10bb1 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -66,18 +66,16 @@ import Data.Hashable
66import Data.List as L 66import Data.List as L
67import Data.Monoid 67import Data.Monoid
68import Data.Text as T 68import Data.Text as T
69import Data.Text.Encoding as T
70import Data.Time 69import Data.Time
71import Data.Time.Clock.POSIX 70import Data.Time.Clock.POSIX
72import System.Log.FastLogger 71import System.Log.FastLogger
73import System.Random (randomIO) 72import System.Random (randomIO)
74import System.Timeout.Lifted
75import Text.PrettyPrint as PP hiding ((<>)) 73import Text.PrettyPrint as PP hiding ((<>))
76import Text.PrettyPrint.Class 74import Text.PrettyPrint.Class
77 75
78import Data.Torrent.InfoHash 76import Data.Torrent.InfoHash
79import Network.KRPC hiding (Options, def) 77import Network.KRPC hiding (Options, def)
80import qualified Network.KRPC as KRPC (Options, def) 78import qualified Network.KRPC as KRPC (def)
81import Network.BitTorrent.Core 79import Network.BitTorrent.Core
82import Network.BitTorrent.Core.PeerAddr as P 80import Network.BitTorrent.Core.PeerAddr as P
83import Network.BitTorrent.DHT.Message 81import Network.BitTorrent.DHT.Message
@@ -305,6 +303,7 @@ insertNode info = fork $ do
305-- Peer storage 303-- Peer storage
306-----------------------------------------------------------------------} 304-----------------------------------------------------------------------}
307 305
306-- TODO limit dht peer store in size (probably by removing oldest peers)
308insertPeer :: Eq ip => InfoHash -> PeerAddr ip -> DHT ip () 307insertPeer :: Eq ip => InfoHash -> PeerAddr ip -> DHT ip ()
309insertPeer ih addr = do 308insertPeer ih addr = do
310 var <- asks contactInfo 309 var <- asks contactInfo