@@ -8,6 +8,7 @@ import Control.Concurrent (forkIO, threadDelay)
88import Control.Exception
99import Control.Monad (forever, when, unless, void)
1010import Control.Monad.IO.Class (MonadIO, liftIO)
11+import Control.Monad.Trans.Class (lift)
1112import Data.ByteString (ByteString)
1213import qualified Data.ByteString as S
1314import Data.Conduit
@@ -176,7 +177,7 @@ serveConnection settings cleaner port app conn remoteHost' =
176177 Nothing -> do
177178 -- Let the application run for as long as it wants
178179 liftIO $ T.pause th
179− res <- app env
180+ res <- lift $ runResourceT $ app env
180181
181182 liftIO $ T.resume th
182183 keepAlive <- sendResponse cleaner env conn res