From 720be7499c24343ac9d63e0b2f5fc510f2785c7b Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Fri, 4 Sep 2015 12:08:58 +0530 Subject: [PATCH] remove a few reduntant stuff --- src/FuncTorrent/Peer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FuncTorrent/Peer.hs b/src/FuncTorrent/Peer.hs index ae95f83..cfefb11 100644 --- a/src/FuncTorrent/Peer.hs +++ b/src/FuncTorrent/Peer.hs @@ -129,7 +129,7 @@ handlePeerMsgs p m peerId = do fileName = name (info m) pieceStatus = mkPieceMap numPieces pieceHash (splitNum fileLen pLen) createDummyFile fileName (fromIntegral fileLen) - (r, _) <- runStateT (msgLoop pieceStatus fileName) pstate + _ <- runStateT (msgLoop pieceStatus fileName) pstate return () msgLoop :: PieceMap -> FilePath -> StateT PState IO () @@ -142,7 +142,7 @@ msgLoop pieceStatus file = do gets peer >>= (\p -> liftIO $ putStrLn $ "--> InterestedMsg to peer: " ++ show p) modify (\st -> st { meInterested = True }) msgLoop pieceStatus file - PState { meInterested = True, heChoking = False } -> do + PState { meInterested = True, heChoking = False } -> case pickPiece pieceStatus of Nothing -> liftIO $ putStrLn "Nothing to download" Just workPiece -> do -- 2.37.2