trypandoc: add 2 second timeout.
This commit is contained in:
parent
2faa57e8e9
commit
7e83686d31
2 changed files with 3 additions and 2 deletions
|
@ -723,7 +723,7 @@ executable trypandoc
|
|||
main-is: trypandoc.hs
|
||||
hs-source-dirs: trypandoc
|
||||
if flag(trypandoc)
|
||||
build-depends: aeson, http-types, wai >= 0.3, wai-extra
|
||||
build-depends: aeson, http-types, wai >= 0.3, wai-extra >= 3.0.24
|
||||
buildable: True
|
||||
else
|
||||
buildable: False
|
||||
|
|
|
@ -12,6 +12,7 @@ Provides a webservice which allows to try pandoc in the browser.
|
|||
-}
|
||||
module Main where
|
||||
import Network.Wai.Handler.CGI
|
||||
import Network.Wai.Middleware.Timeout (timeout)
|
||||
import Network.Wai
|
||||
import Control.Applicative ((<$>))
|
||||
import Data.Maybe (fromMaybe)
|
||||
|
@ -29,7 +30,7 @@ import qualified Data.Text as T
|
|||
import Data.Text (Text)
|
||||
|
||||
main :: IO ()
|
||||
main = run app
|
||||
main = run $ timeout 2 app
|
||||
|
||||
app :: Application
|
||||
app req respond = do
|
||||
|
|
Loading…
Add table
Reference in a new issue