From ba50676a1fe66c5f24f251984f2cb49c0e98aead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 28 Jul 2022 21:29:37 +0200 Subject: Service: wait with output after head commit --- src/Test.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Test.hs') diff --git a/src/Test.hs b/src/Test.hs index 19d1a64..8c26f5e 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -122,11 +122,11 @@ pairingAttributes _ out peers prefix = PairingAttributes , pairingHookResponse = \confirm -> do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-response", index, confirm] + afterCommit $ outLine out $ unwords [prefix ++ "-response", index, confirm] , pairingHookRequestNonce = \confirm -> do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-request", index, confirm] + afterCommit $ outLine out $ unwords [prefix ++ "-request", index, confirm] , pairingHookRequestNonceFailed = failed "nonce" @@ -135,11 +135,11 @@ pairingAttributes _ out peers prefix = PairingAttributes , pairingHookAcceptedResponse = do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-response-done", index] + afterCommit $ outLine out $ unwords [prefix ++ "-response-done", index] , pairingHookAcceptedRequest = do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-request-done", index] + afterCommit $ outLine out $ unwords [prefix ++ "-request-done", index] , pairingHookFailed = \case PairingUserRejected -> failed "user" @@ -160,7 +160,7 @@ pairingAttributes _ out peers prefix = PairingAttributes _ -> fail "unexpected pairing state" index <- show <$> getPeerIndex peers - liftIO $ outLine out $ prefix ++ "-" ++ ptype ++ "-failed " ++ index ++ " " ++ detail + afterCommit $ outLine out $ prefix ++ "-" ++ ptype ++ "-failed " ++ index ++ " " ++ detail strState :: PairingState a -> String strState = \case -- cgit v1.2.3