From 36b9a1ddbddf1477c61809d340cd0b86360a7a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 20 Dec 2020 21:47:22 +0100 Subject: Network: STM-based synchronization rewrite --- src/Contact.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Contact.hs') diff --git a/src/Contact.hs b/src/Contact.hs index 814e324..fefcd1f 100644 --- a/src/Contact.hs +++ b/src/Contact.hs @@ -121,7 +121,7 @@ contactAccept printMsg h peer = do liftIO $ printMsg $ "Contact accepted, waiting for peer confirmation" return (Nothing, OurRequestReady) OurRequestConfirm (Just ContactAccepted) -> do - PeerIdentityFull pid <- return $ peerIdentity peer + PeerIdentityFull pid <- peerIdentity peer liftIO $ do printMsg $ "Contact accepted" updateLocalState_ h $ finalizeContact pid @@ -129,7 +129,7 @@ contactAccept printMsg h peer = do OurRequestReady -> throwError $ "alredy accepted, waiting for peer" PeerRequest {} -> throwError $ "waiting for peer" PeerRequestConfirm -> do - PeerIdentityFull pid <- return $ peerIdentity peer + PeerIdentityFull pid <- peerIdentity peer liftIO $ do printMsg $ "Contact accepted" updateLocalState_ h $ finalizeContact pid -- cgit v1.2.3