From 9a49270d9b177ed5ac2239e4381e343eaa051cc1 Mon Sep 17 00:00:00 2001 From: Jaseem Abid <jaseemabid@gmail.com> Date: Sun, 22 Mar 2015 22:44:43 +0530 Subject: [PATCH] Fix key error --- src/FuncTorrent/Peer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FuncTorrent/Peer.hs b/src/FuncTorrent/Peer.hs index 105994d..bf5c912 100644 --- 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')) -- 2.45.2