webapp: Avoid an error if a transfer is stopped just as it finishes. Closes: #698184

This commit is contained in:
Joey Hess 2013-01-14 18:58:45 -04:00
parent 7efdab3852
commit a707d69e77
2 changed files with 3 additions and 1 deletions

View file

@ -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

2
debian/changelog vendored
View file

@ -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 <joeyh@debian.org> Mon, 14 Jan 2013 18:35:01 -0400