webapp: Avoid an error if a transfer is stopped just as it finishes. Closes: #698184
This commit is contained in:
parent
7efdab3852
commit
a707d69e77
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue