summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/GetTorrent.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs5
2 files changed, 2 insertions, 5 deletions
diff --git a/examples/GetTorrent.hs b/examples/GetTorrent.hs
index db52263d..9a203bf0 100644
--- a/examples/GetTorrent.hs
+++ b/examples/GetTorrent.hs
@@ -7,8 +7,6 @@ import Control.Monad.Trans
7import Data.Conduit as C 7import Data.Conduit as C
8import Data.Conduit.List as C 8import Data.Conduit.List as C
9import Data.Default 9import Data.Default
10import Data.Maybe
11import Network.URI
12import Options.Applicative 10import Options.Applicative
13import System.Exit 11import System.Exit
14import System.FilePath 12import System.FilePath
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