diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-01-07 03:53:59 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-01-07 03:53:59 +0400 |
commit | 7520e893fb5e4141be53ce35b80be73d1d43ae58 (patch) | |
tree | 57a5ca801dec8402ad1f9f069e521f89973a0b03 /src/Network/BitTorrent | |
parent | 6f3d7093d6e1c2e3c5138da58b850778759435f8 (diff) |
Remove logging from DHT handlers
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r-- | src/Network/BitTorrent/DHT.hs | 4 |
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 | ||
57 | pingH :: Address ip => NodeHandler ip | 57 | pingH :: Address ip => NodeHandler ip |
58 | pingH = nodeHandler $ \ _ Ping -> do | 58 | pingH = nodeHandler $ \ _ Ping -> do |
59 | $(logDebug) "ping received, sending pong" | ||
60 | return Ping | 59 | return Ping |
61 | 60 | ||
62 | findNodeH :: Address ip => NodeHandler ip | 61 | findNodeH :: Address ip => NodeHandler ip |
63 | findNodeH = nodeHandler $ \ _ (FindNode nid) -> do | 62 | findNodeH = nodeHandler $ \ _ (FindNode nid) -> do |
64 | $(logDebug) "find_node received, sending closest nodes back" | ||
65 | NodeFound <$> getClosest nid | 63 | NodeFound <$> getClosest nid |
66 | 64 | ||
67 | getPeersH :: Address ip => NodeHandler ip | 65 | getPeersH :: Address ip => NodeHandler ip |
68 | getPeersH = nodeHandler $ \ naddr (GetPeers ih) -> do | 66 | getPeersH = 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 | ||
72 | announceH :: Address ip => NodeHandler ip | 69 | announceH :: Address ip => NodeHandler ip |
73 | announceH = nodeHandler $ \ naddr (Announce {..}) -> do | 70 | announceH = 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" "" |