summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Network/BitTorrent/DHT/Search.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/DHT/Search.hs b/src/Network/BitTorrent/DHT/Search.hs
index b263e339..51b40b2c 100644
--- a/src/Network/BitTorrent/DHT/Search.hs
+++ b/src/Network/BitTorrent/DHT/Search.hs
@@ -19,6 +19,7 @@ import Data.Maybe
19import qualified Data.Set as Set 19import qualified Data.Set as Set
20 ;import Data.Set (Set) 20 ;import Data.Set (Set)
21import System.IO 21import System.IO
22import System.IO.Error
22 23
23import qualified Data.MinMaxPSQ as MM 24import qualified Data.MinMaxPSQ as MM
24 ;import Data.MinMaxPSQ (MinMaxPSQ, MinMaxPSQ') 25 ;import Data.MinMaxPSQ (MinMaxPSQ, MinMaxPSQ')
@@ -114,9 +115,7 @@ sendQuery :: forall addr nid tok ni r.
114 -> IO () 115 -> IO ()
115sendQuery Search{..} searchTarget searchResult sch@SearchState{..} (ni :-> d) = do 116sendQuery Search{..} searchTarget searchResult sch@SearchState{..} (ni :-> d) = do
116 myThreadId >>= flip labelThread ("searchQuery." ++ show searchTarget) 117 myThreadId >>= flip labelThread ("searchQuery." ++ show searchTarget)
117 -- TODO: Should we really be catching ThreadKilled ? 118 reply <- searchQuery searchTarget ni `catchIOError` const (return Nothing)
118 reply <- handle (\(SomeException e) -> return Nothing)
119 (searchQuery searchTarget ni)
120 -- (ns,rs) 119 -- (ns,rs)
121 let tok = error "TODO: token" 120 let tok = error "TODO: token"
122 atomically $ do 121 atomically $ do