]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/FuncTorrent/Peer.hs
Peer: catchall case statement to catch any invalid msgs
[functorrent.git] / src / FuncTorrent / Peer.hs
index 3e16254a53c84f618bce0d569e2bfe4a03af4e78..9dd307d45c7a68898768d5b0c320440ed6409f6e 100644 (file)
@@ -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