Debug output for Devel.hs

This commit is contained in:
Michael Snoyman 2012-11-26 15:32:42 +02:00
parent f6dd0b56b9
commit 5a29eec9c7

View File

@ -121,10 +121,14 @@ defaultDevelOpts = DevelOpts False False False (-1) Nothing Nothing Nothing
reverseProxy :: IO ()
reverseProxy = withSocketsDo $ do
manager <- newManager def
run 3000 $ waiProxyTo
(const $ return $ Right $ ProxyDest "127.0.0.1" 3001)
onExc
manager
forever $ do
run 3000 $ waiProxyTo
(const $ return $ Right $ ProxyDest "127.0.0.1" 3001)
onExc
manager
putStrLn "Reverse proxy stopped, but it shouldn't"
threadDelay 1000000
putStrLn "Restarting reverse proxy"
where
onExc _ _ = return $ responseLBS
status200