mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-14 09:32:22 +00:00
Fix exception handling and increase rendering limit to 30s.
This commit is contained in:
parent
1328c9f861
commit
85e64d863d
1 changed files with 3 additions and 2 deletions
|
|
@ -74,7 +74,7 @@ generateResponse c conn msg = do
|
|||
case ret of
|
||||
Left err -> do
|
||||
sendTextData conn $ T.pack $ "Error" ++ unlines (drop 3 (lines err))
|
||||
Right{} -> withTimeout conn 10 $ do
|
||||
Right{} -> withTimeout conn 30 $ do
|
||||
sendTextData conn (T.pack "Rendering")
|
||||
getFrame <- runCmdLazy tmpExecutable ["+RTS", "-N", "-M50M", "-RTS"]
|
||||
flip fix [] $ \loop acc -> do
|
||||
|
|
@ -97,7 +97,8 @@ withTimeout conn t action = do
|
|||
threadDelay (10^6 * t)
|
||||
killThread self
|
||||
sendTextData conn $ T.pack $ "Error" ++ "Timeout"
|
||||
action `finally` killThread timer
|
||||
action
|
||||
killThread timer
|
||||
|
||||
-- mergeValues :: C.Cache String [T.Text] -> IO ()
|
||||
-- mergeValues cache = do
|
||||
|
|
|
|||
Loading…
Reference in a new issue