summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/DHT/Query.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/DHT/Query.hs b/src/Network/BitTorrent/DHT/Query.hs
index ad29adb6..77fede94 100644
--- a/src/Network/BitTorrent/DHT/Query.hs
+++ b/src/Network/BitTorrent/DHT/Query.hs
@@ -133,7 +133,8 @@ nodeHandler :: forall raw dht addr u t q r.
133 IsString t, Functor dht, 133 IsString t, Functor dht,
134 KRPC dht (Query dht q) (Response dht r), 134 KRPC dht (Query dht q) (Response dht r),
135 SerializableTo raw (Response dht r), 135 SerializableTo raw (Response dht r),
136 SerializableTo raw (Query dht q)) => 136 SerializableTo raw (Query dht q),
137 Show (QueryMethod dht)) =>
137 (NodeInfo dht addr u -> Maybe ReflectedIP -> IO ()) 138 (NodeInfo dht addr u -> Maybe ReflectedIP -> IO ())
138 -> (NodeAddr addr -> IO (NodeId dht)) 139 -> (NodeAddr addr -> IO (NodeId dht))
139 -> (Char -> t -> Text -> IO ()) 140 -> (Char -> t -> Text -> IO ())
@@ -150,6 +151,7 @@ nodeHandler insertNode myNodeIdAccordingTo logm dta method action = handler meth
150 case fromSockAddr sockAddr of 151 case fromSockAddr sockAddr of
151 Nothing -> throwIO BadAddress 152 Nothing -> throwIO BadAddress
152 Just naddr -> do 153 Just naddr -> do
154 logm 'D' "nodeHandler" $ "Received query: " <> T.pack (show $ method)
153 me <- myNodeIdAccordingTo naddr 155 me <- myNodeIdAccordingTo naddr
154 rextra <- liftIO $ makeResponseExtra dta me qry resptype 156 rextra <- liftIO $ makeResponseExtra dta me qry resptype
155 let ni = NodeInfo remoteId naddr def 157 let ni = NodeInfo remoteId naddr def