summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-01-07 03:53:59 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-01-07 03:53:59 +0400
commit7520e893fb5e4141be53ce35b80be73d1d43ae58 (patch)
tree57a5ca801dec8402ad1f9f069e521f89973a0b03 /src
parent6f3d7093d6e1c2e3c5138da58b850778759435f8 (diff)
Remove logging from DHT handlers
Diffstat (limited to 'src')
-rw-r--r--src/Network/BitTorrent/DHT.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/DHT.hs b/src/Network/BitTorrent/DHT.hs
index c35b5bd6..6ce4c515 100644
--- a/src/Network/BitTorrent/DHT.hs
+++ b/src/Network/BitTorrent/DHT.hs
@@ -56,22 +56,18 @@ import Network.KRPC
56 56
57pingH :: Address ip => NodeHandler ip 57pingH :: Address ip => NodeHandler ip
58pingH = nodeHandler $ \ _ Ping -> do 58pingH = nodeHandler $ \ _ Ping -> do
59 $(logDebug) "ping received, sending pong"
60 return Ping 59 return Ping
61 60
62findNodeH :: Address ip => NodeHandler ip 61findNodeH :: Address ip => NodeHandler ip
63findNodeH = nodeHandler $ \ _ (FindNode nid) -> do 62findNodeH = nodeHandler $ \ _ (FindNode nid) -> do
64 $(logDebug) "find_node received, sending closest nodes back"
65 NodeFound <$> getClosest nid 63 NodeFound <$> getClosest nid
66 64
67getPeersH :: Address ip => NodeHandler ip 65getPeersH :: Address ip => NodeHandler ip
68getPeersH = nodeHandler $ \ naddr (GetPeers ih) -> do 66getPeersH = nodeHandler $ \ naddr (GetPeers ih) -> do
69 $(logDebug) "get_peers received, trying to find peers"
70 GotPeers <$> getPeerList ih <*> grantToken naddr 67 GotPeers <$> getPeerList ih <*> grantToken naddr
71 68
72announceH :: Address ip => NodeHandler ip 69announceH :: Address ip => NodeHandler ip
73announceH = nodeHandler $ \ naddr (Announce {..}) -> do 70announceH = nodeHandler $ \ naddr (Announce {..}) -> do
74 $(logDebug) "announce received, trying to check token"
75 checkToken naddr sessionToken 71 checkToken naddr sessionToken
76 case fromAddr naddr of 72 case fromAddr naddr of
77 Nothing -> throw $ KError ProtocolError "bad address" "" 73 Nothing -> throw $ KError ProtocolError "bad address" ""