projects
/
functorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ca067b
)
Fix key error
author
Jaseem Abid
<jaseemabid@gmail.com>
Sun, 22 Mar 2015 17:14:43 +0000
(22:44 +0530)
committer
Jaseem Abid
<jaseemabid@gmail.com>
Sun, 22 Mar 2015 17:14:43 +0000
(22:44 +0530)
src/FuncTorrent/Peer.hs
patch
|
blob
|
history
diff --git
a/src/FuncTorrent/Peer.hs
b/src/FuncTorrent/Peer.hs
index 105994d2ccdf502bbf3029206f41144f05463dec..bf5c91201e76983e74821d639562cd3e5f6c7e5d 100644
(file)
--- a/
src/FuncTorrent/Peer.hs
+++ b/
src/FuncTorrent/Peer.hs
@@
-37,7
+37,7
@@
toInt = read
getPeerResponse :: ByteString -> PeerResp
getPeerResponse body = case decode body of
Right (Bdict peerM) ->
- let (Just (Bint i)) = lookup (Bstr (pack "
lookup
")) peerM
+ let (Just (Bint i)) = lookup (Bstr (pack "
interval
")) peerM
(Bstr peersBS) = peerM ! Bstr (pack "peers")
pl = map (\peer -> let (ip', port') = splitAt 4 peer
in Peer (toIPNum ip') (toPortNum port'))