FileSystem: bug fix, run should run for ever
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 15 Dec 2015 17:30:56 +0000 (23:00 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 15 Dec 2015 17:30:56 +0000 (23:00 +0530)
src/FuncTorrent/FileSystem.hs

index 56ec41edda80af584ca8dee0ea0d1f7c3ff0df59..fdf89fa94bae2415d9fa12d572cade889823eebf 100644 (file)
@@ -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