]> git.rkrishnan.org Git - functorrent.git/commitdiff
fix the comments
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 24 Jul 2015 11:04:53 +0000 (16:34 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 24 Jul 2015 11:04:53 +0000 (16:34 +0530)
src/FuncTorrent/Peer.hs

index bd44076a813258eabf0388933d5e43a66b6dbbb4..6b8466629a93705046485e3d4b121ce29f577b65 100644 (file)
@@ -199,14 +199,16 @@ createDummyFile path size =
 msgLoop :: PeerState -> PieceMap -> IO ()
 msgLoop state pieceStatus | meInterested state == False &&
                             heChoking state == True = do
-                              -- if meInterested and he NOT Choking, pick a piece to download
-                              -- and send a requestmsg.
+                              -- if me NOT Interested and she is Choking, tell her that
+                              -- I am interested.
                               let h = handle state
                               sendMsg h InterestedMsg
                               putStrLn $ "--> InterestedMsg to peer: " ++ show (peer state)
                               msgLoop (state { meInterested = True }) pieceStatus
                           | meInterested state == True &&
                             heChoking state == False =
+                              -- if me Interested and she not Choking, send her a request
+                              -- for a piece.
                               case pickPiece pieceStatus of
                                Nothing -> putStrLn "Nothing to download"
                                Just workPiece -> do