diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-06 14:56:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-06 14:56:04 -0400 |
commit | a00f1d26bc3f121e49ee3f6ff5f46d7b330161ff (patch) | |
tree | 1951e9ca7e482fc67f9c232b0fb22680ee19f5a0 /Assistant/Threads/WebApp.hs | |
parent | d11ded822cf68d4f33a886e0f97f95a3781e0dc1 (diff) |
display errors when any named thread crashes
Diffstat (limited to 'Assistant/Threads/WebApp.hs')
-rw-r--r-- | Assistant/Threads/WebApp.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs index 7da3c82e5..73a4467cd 100644 --- a/Assistant/Threads/WebApp.hs +++ b/Assistant/Threads/WebApp.hs @@ -50,8 +50,8 @@ webAppThread -> TransferSlots -> Maybe (IO String) -> Maybe (Url -> FilePath -> IO ()) - -> IO () -webAppThread mst dstatus scanremotes transferqueue transferslots postfirstrun onstartup = do + -> NamedThread +webAppThread mst dstatus scanremotes transferqueue transferslots postfirstrun onstartup = thread $ do webapp <- WebApp <$> pure mst <*> pure dstatus @@ -72,6 +72,7 @@ webAppThread mst dstatus scanremotes transferqueue transferslots postfirstrun on Nothing -> withTempFile "webapp.html" $ \tmpfile _ -> go port webapp tmpfile Just st -> go port webapp =<< runThreadState st (fromRepo gitAnnexHtmlShim) where + thread = NamedThread thisThread getreldir Nothing = return Nothing getreldir (Just st) = Just <$> (relHome =<< absPath |