From 3ddfd24a0b158bdf06f654a373f82e0591cb9b8f Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 7 Jan 2014 04:53:19 +0400 Subject: Remove logging from queryNode --- src/Network/BitTorrent/DHT/Session.hs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/Network/BitTorrent/DHT/Session.hs') diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs index 6c43c732..4e6a6825 100644 --- a/src/Network/BitTorrent/DHT/Session.hs +++ b/src/Network/BitTorrent/DHT/Session.hs @@ -333,23 +333,13 @@ queryNode :: forall a b ip. Address ip => KRPC (Query a) (Response b) => NodeAddr ip -> a -> DHT ip b queryNode addr q = do nid <- getNodeId - - let Method name = method :: Method (Query a) (Response b) - let signature = T.decodeUtf8 name <> " @ " <> T.pack (render (pretty addr)) - $(logDebugS) "queryNode" $ "Query sent | " <> signature - + -- TODO remove timeout: KRPC already keep track timeouts interval <- asks (optTimeout . options) result <- timeout (microseconds interval) $ do query (toSockAddr addr) (Query nid q) case result of - Nothing -> do - $(logWarnS) "queryNode" $ "not responding @ " - <> T.pack (show (pretty addr)) <> " for " - <> T.pack (show interval) - ioError $ userError "timeout expired" - + Nothing -> ioError $ userError "timeout expired" Just (Response remoteId r) -> do - $(logDebugS) "queryNode" $ "Query recv | " <> signature insertNode (NodeInfo remoteId addr) return r -- cgit v1.2.3