improve clientKeepLocked

This commit is contained in:
Joey Hess 2024-07-22 16:56:44 -04:00
parent 10682eb882
commit d5eaf0f567
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 22 additions and 22 deletions

View file

@ -133,18 +133,15 @@ getAuthEnv = do
testKeepLocked = do
mgr <- httpManager <$> getUrlOptions
burl <- liftIO $ parseBaseUrl "http://localhost:8080/"
keeplocked <- liftIO newEmptyTMVarIO
_ <- liftIO $ forkIO $ do
print "running, press enter to drop lock"
_ <- getLine
atomically $ writeTMVar keeplocked False
liftIO $ clientKeepLocked (mkClientEnv mgr burl)
(P2P.ProtocolVersion 3)
(B64UUID (toUUID ("lck" :: String)))
(B64UUID (toUUID ("cu" :: String)))
(B64UUID (toUUID ("su" :: String)))
[]
keeplocked
[] $ \keeplocked -> do
print "running, press enter to drop lock"
_ <- getLine
atomically $ writeTMVar keeplocked False
testCheckPresent = do
mgr <- httpManager <$> getUrlOptions