diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-08 19:58:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-08 19:58:47 -0400 |
commit | c44ecb7bb2dc49d5334265389ceae4b0718a9b8d (patch) | |
tree | 5bf57afb6f63173f979f7fa2aff200aaac8e90d0 /Remote | |
parent | c79ab2b09dfc489a259198d8a74752ff401c1d8a (diff) |
forgot to delay for 1 second in busy wait loop
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Tahoe.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/Tahoe.hs b/Remote/Tahoe.hs index c5494939a..6abbeaf5e 100644 --- a/Remote/Tahoe.hs +++ b/Remote/Tahoe.hs @@ -39,6 +39,7 @@ import Logs.RemoteState import Utility.UserInfo import Utility.Metered import Utility.Env +import Utility.ThreadScheduler {- The TMVar is left empty until tahoe has been verified to be running. -} data TahoeHandle = TahoeHandle TahoeConfigDir (TMVar ()) @@ -170,7 +171,9 @@ getSharedConvergenceSecret configdir = go (60 :: Int) case v of Just s | "\n" `isSuffixOf` s || "\r" `isSuffixOf` s -> return $ takeWhile (`notElem` "\n\r") s - _ -> go (n - 1) + _ -> do + threadDelaySeconds (Seconds 1) + go (n - 1) convergenceFile :: TahoeConfigDir -> FilePath convergenceFile configdir = configdir </> "private" </> "convergence" |