]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/Main.hs
convert bitfield from a peer into piece list
[functorrent.git] / src / Main.hs
index afa0bd329d9f0edaa5f9af6274087193cc741120..d92b9d1fcc42b526c0939292ab4e7e38a2594cea 100644 (file)
@@ -66,7 +66,7 @@ main = do
                           let p1 = head (peers peerResp)
                           h <- handShake p1 (infoHash m) peerId
                           log $ "handshake"
-                          msgLoop h
+                          msgLoop h (pieces (info m))
                       Left e -> log $ "Error" ++ unpack e
                 Left e -> logError e log