]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/FuncTorrent/FileSystem.hs
FileSystem: bug fix, run should run for ever
[functorrent.git] / 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