diff options
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/Hakyll/SimpleServer.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Network/Hakyll/SimpleServer.hs b/src/Network/Hakyll/SimpleServer.hs index 4baa466..f98c295 100644 --- a/src/Network/Hakyll/SimpleServer.hs +++ b/src/Network/Hakyll/SimpleServer.hs @@ -6,7 +6,7 @@ module Network.Hakyll.SimpleServer import Prelude hiding (log) import Network -import Control.Monad (forever, mapM_) +import Control.Monad (forever) import Control.Monad.Reader (ReaderT, runReaderT, ask, liftIO) import System.IO import System.Directory (doesFileExist, doesDirectoryExist) @@ -202,10 +202,9 @@ simpleServer port root = do -- When a client connects, respond in a separate thread. listen socket = do (handle, _, _) <- accept socket forkIO (runReaderT (respond handle) config) - return () -- Handle logging in a separate thread - forkIO (log logChan) + _ <- forkIO (log logChan) writeChan logChan $ "Starting hakyll server on port " ++ show port ++ "..." socket <- listenOn (PortNumber port) |