From 0ca4bb429f365393d90040324c2939d32711fc77 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org> Date: Sat, 27 Feb 2016 17:27:42 +0530 Subject: [PATCH] Peer: catchall case statement to catch any invalid msgs --- src/FuncTorrent/Peer.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.45.2