diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-02-28 09:24:37 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-02-28 09:24:37 -0800 |
commit | 7e83686d31bd1ebf627b843eff6210a636e6f719 (patch) | |
tree | e76d8acb88c16924e880a64a84939987b71e1d9c /trypandoc | |
parent | 2faa57e8e96d9905676e30f62d34c06b074acf76 (diff) | |
download | pandoc-7e83686d31bd1ebf627b843eff6210a636e6f719.tar.gz |
trypandoc: add 2 second timeout.
Diffstat (limited to 'trypandoc')
-rw-r--r-- | trypandoc/trypandoc.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs index 810752afa..385fcfe55 100644 --- a/trypandoc/trypandoc.hs +++ b/trypandoc/trypandoc.hs @@ -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 |