From a707d69e77beb79b5251cc53ddd6869f90ca5235 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jan 2013 18:58:45 -0400 Subject: [PATCH] webapp: Avoid an error if a transfer is stopped just as it finishes. Closes: #698184 --- Assistant/WebApp/Utility.hs | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Assistant/WebApp/Utility.hs b/Assistant/WebApp/Utility.hs index d4d59a9bd1..e2eb3f5a81 100644 --- a/Assistant/WebApp/Utility.hs +++ b/Assistant/WebApp/Utility.hs @@ -88,7 +88,7 @@ cancelTransfer pause t = do | otherwise = killThread tid {- In order to stop helper processes like rsync, - kill the whole process group of the process running the transfer. -} - killproc pid = do + killproc pid = void $ catchMaybeIO $ do g <- getProcessGroupIDOf pid void $ tryIO $ signalProcessGroup sigTERM g threadDelay 50000 -- 0.05 second grace period diff --git a/debian/changelog b/debian/changelog index e3c5295351..67c955fea3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ git-annex (3.20130115) UNRELEASED; urgency=low * webapp: More adjustments to longpoll code to deal with changes in variable quoting in different versions of shakespeare-js. + * webapp: Avoid an error if a transfer is stopped just as it finishes. + Closes: #698184 -- Joey Hess Mon, 14 Jan 2013 18:35:01 -0400