From: Ramakrishnan Muthukrishnan Date: Sat, 27 Feb 2016 11:57:42 +0000 (+0530) Subject: Peer: catchall case statement to catch any invalid msgs X-Git-Url: https://git.rkrishnan.org/vdrive/components/com_hotproperty/css/readonly?a=commitdiff_plain;h=0ca4bb429f365393d90040324c2939d32711fc77;p=functorrent.git Peer: catchall case statement to catch any invalid msgs --- diff --git a/src/FuncTorrent/Peer.hs b/src/FuncTorrent/Peer.hs index 3e16254..9dd307d 100644 --- a/src/FuncTorrent/Peer.hs +++ b/src/FuncTorrent/Peer.hs @@ -155,8 +155,10 @@ msgLoop pieceStatus msgchannel = do p <- gets peer let pieceStatus' = updatePieceAvailability pieceStatus p [idx] msgLoop pieceStatus' msgchannel - -- handle RequestMsg. No need to handle PieceMsg here. - -- also BitFieldMsg + _ -> do + liftIO $ putStrLn $ ".. not doing anything with the msg" + msgLoop pieceStatus msgchannel + -- No need to handle PieceMsg and RequestMsg here. downloadPiece :: Handle -> Integer -> Integer -> IO ByteString