From: Ramakrishnan Muthukrishnan Date: Sat, 16 May 2015 06:45:57 +0000 (+0530) Subject: remove the debug prints X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/frontends//%22%22.?a=commitdiff_plain;h=41ba76f941e2b866337cefa41af22aaa11df45a9;p=functorrent.git remove the debug prints --- diff --git a/src/FuncTorrent/Peer.hs b/src/FuncTorrent/Peer.hs index 95e2938..8007ab0 100644 --- a/src/FuncTorrent/Peer.hs +++ b/src/FuncTorrent/Peer.hs @@ -140,11 +140,8 @@ getMsg h = do if l == 0 then return KeepAliveMsg else do - putStrLn $ "len: " ++ show l - msgID <- hGet h 1 - putStrLn $ "msg Type: " ++ show msgID - msg <- hGet h (l - 1) - return $ decode $ fromStrict $ concat [lBS, msgID, msg] + msg <- hGet h l + return $ decode $ fromStrict $ concat [lBS, msg] bsToInt :: ByteString -> Int bsToInt x = fromIntegral (runGet getWord32be (fromChunks (return x)))