aboutsummaryrefslogtreecommitdiff
path: root/Remote/Tahoe.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-08 19:58:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-08 19:58:47 -0400
commitc44ecb7bb2dc49d5334265389ceae4b0718a9b8d (patch)
tree5bf57afb6f63173f979f7fa2aff200aaac8e90d0 /Remote/Tahoe.hs
parentc79ab2b09dfc489a259198d8a74752ff401c1d8a (diff)
forgot to delay for 1 second in busy wait loop
Diffstat (limited to 'Remote/Tahoe.hs')
-rw-r--r--Remote/Tahoe.hs5
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"