diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-28 17:17:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-28 17:17:09 -0400 |
commit | 0dd786039395637ad702f48c84eb8dcd323527f1 (patch) | |
tree | 984ef1af37824aafe6d4e1d57991a826ec702e81 /Assistant/WebApp | |
parent | 19e8f1ca0e0b55910bf85fbbae72997618e4d2be (diff) |
fix a transfers display glitch
Run code that pops off the next queued transfer and adds it to the active
transfer map within an allocated transfer slot, rather than before
allocating a slot. Fixes the transfers display, which had been displaying
the next transfer as a running transfer, while the previous transfer was
still running.
Diffstat (limited to 'Assistant/WebApp')
-rw-r--r-- | Assistant/WebApp/DashBoard.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Assistant/WebApp/DashBoard.hs b/Assistant/WebApp/DashBoard.hs index 949793121..e51708d64 100644 --- a/Assistant/WebApp/DashBoard.hs +++ b/Assistant/WebApp/DashBoard.hs @@ -210,9 +210,10 @@ startTransfer t = do - forget that old pid, and start a new one. -} liftIO $ updateTransferInfo dstatus t $ info { transferPid = Nothing } - liftIO $ Transferrer.transferThread - dstatus slots t info inImmediateTransferSlot - =<< readProgramFile + liftIO $ inImmediateTransferSlot dstatus slots $ do + program <- readProgramFile + let a = Transferrer.doTransfer dstatus t info program + return $ Just (t, info, a) getCurrentTransfers :: Handler TransferMap getCurrentTransfers = currentTransfers |