forgot to delay for 1 second in busy wait loop
This commit is contained in:
parent
2743fc2782
commit
d8fb366cf7
1 changed files with 4 additions and 1 deletions
|
@ -39,6 +39,7 @@ import Logs.RemoteState
|
||||||
import Utility.UserInfo
|
import Utility.UserInfo
|
||||||
import Utility.Metered
|
import Utility.Metered
|
||||||
import Utility.Env
|
import Utility.Env
|
||||||
|
import Utility.ThreadScheduler
|
||||||
|
|
||||||
{- The TMVar is left empty until tahoe has been verified to be running. -}
|
{- The TMVar is left empty until tahoe has been verified to be running. -}
|
||||||
data TahoeHandle = TahoeHandle TahoeConfigDir (TMVar ())
|
data TahoeHandle = TahoeHandle TahoeConfigDir (TMVar ())
|
||||||
|
@ -170,7 +171,9 @@ getSharedConvergenceSecret configdir = go (60 :: Int)
|
||||||
case v of
|
case v of
|
||||||
Just s | "\n" `isSuffixOf` s || "\r" `isSuffixOf` s ->
|
Just s | "\n" `isSuffixOf` s || "\r" `isSuffixOf` s ->
|
||||||
return $ takeWhile (`notElem` "\n\r") s
|
return $ takeWhile (`notElem` "\n\r") s
|
||||||
_ -> go (n - 1)
|
_ -> do
|
||||||
|
threadDelaySeconds (Seconds 1)
|
||||||
|
go (n - 1)
|
||||||
|
|
||||||
convergenceFile :: TahoeConfigDir -> FilePath
|
convergenceFile :: TahoeConfigDir -> FilePath
|
||||||
convergenceFile configdir = configdir </> "private" </> "convergence"
|
convergenceFile configdir = configdir </> "private" </> "convergence"
|
||||||
|
|
Loading…
Add table
Reference in a new issue