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/TransferPoller.hs | |
parent | d11ded822cf68d4f33a886e0f97f95a3781e0dc1 (diff) |
display errors when any named thread crashes
Diffstat (limited to 'Assistant/Threads/TransferPoller.hs')
-rw-r--r-- | Assistant/Threads/TransferPoller.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Threads/TransferPoller.hs b/Assistant/Threads/TransferPoller.hs index 79bcb98b5..e31dfb40c 100644 --- a/Assistant/Threads/TransferPoller.hs +++ b/Assistant/Threads/TransferPoller.hs @@ -21,8 +21,8 @@ thisThread = "TransferPoller" {- This thread polls the status of ongoing transfers, determining how much - of each transfer is complete. -} -transferPollerThread :: ThreadState -> DaemonStatusHandle -> IO () -transferPollerThread st dstatus = do +transferPollerThread :: ThreadState -> DaemonStatusHandle -> NamedThread +transferPollerThread st dstatus = thread $ do g <- runThreadState st $ fromRepo id tn <- newNotificationHandle =<< transferNotifier <$> getDaemonStatus dstatus @@ -33,6 +33,7 @@ transferPollerThread st dstatus = do then waitNotification tn -- block until transfers running else mapM_ (poll g) $ M.toList ts where + thread = NamedThread thisThread poll g (t, info) {- Downloads are polled by checking the size of the - temp file being used for the transfer. -} |