From 8c674d0518e6e54685e31266a47820389dbf5365 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Tue, 15 Dec 2015 23:00:56 +0530
Subject: [PATCH] FileSystem: bug fix, run should run for ever

---
 src/FuncTorrent/FileSystem.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.45.2