nasty race workaround
This commit is contained in:
parent
40aab719df
commit
73c28d2ca7
1 changed files with 9 additions and 1 deletions
|
@ -18,6 +18,8 @@ import Utility.DirWatcher
|
||||||
import Utility.Types.DirWatcher
|
import Utility.Types.DirWatcher
|
||||||
import qualified Remote
|
import qualified Remote
|
||||||
|
|
||||||
|
import Control.Concurrent
|
||||||
|
|
||||||
thisThread :: ThreadName
|
thisThread :: ThreadName
|
||||||
thisThread = "TransferWatcher"
|
thisThread = "TransferWatcher"
|
||||||
|
|
||||||
|
@ -103,6 +105,12 @@ onDel st dstatus transferqueue file _ = case parseTransferFile file of
|
||||||
, show t
|
, show t
|
||||||
]
|
]
|
||||||
minfo <- removeTransfer dstatus t
|
minfo <- removeTransfer dstatus t
|
||||||
|
|
||||||
|
void $ forkIO $ do
|
||||||
|
{- XXX race workaround delay. The location
|
||||||
|
- log needs to be updated before finishedTransfer
|
||||||
|
- runs. -}
|
||||||
|
threadDelay 10000000 -- 10 seconds
|
||||||
finishedTransfer st dstatus transferqueue t minfo
|
finishedTransfer st dstatus transferqueue t minfo
|
||||||
|
|
||||||
{- Queue uploads of files we successfully downloaded, spreading them
|
{- Queue uploads of files we successfully downloaded, spreading them
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue