From: Ramakrishnan Muthukrishnan Date: Tue, 15 Dec 2015 17:30:56 +0000 (+0530) Subject: FileSystem: bug fix, run should run for ever X-Git-Url: https://git.rkrishnan.org/vdrive/components/status?a=commitdiff_plain;h=8c674d0518e6e54685e31266a47820389dbf5365;p=functorrent.git FileSystem: bug fix, run should run for ever --- diff --git a/src/FuncTorrent/FileSystem.hs b/src/FuncTorrent/FileSystem.hs index 56ec41e..fdf89fa 100644 --- a/src/FuncTorrent/FileSystem.hs +++ b/src/FuncTorrent/FileSystem.hs @@ -39,7 +39,7 @@ createMsgChannel :: IO (Chan Msg) createMsgChannel = newChan run :: PieceMap -> MsgChannel -> Handle -> IO () -run pieceMap c handle = do +run pieceMap c handle = forever $ do _ <- runStateT (run' pieceMap c handle) initialStats return () where initialStats = Stats { bytesRead = 0