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.
This commit is contained in:
parent
19e8f1ca0e
commit
0dd7860393
3 changed files with 52 additions and 50 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue