summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/External.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index b8a964480..250719641 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -266,7 +266,9 @@ fromExternal lck external extractor a =
go (Just st) = run st
go Nothing = do
st <- startExternal $ externalType external
- void $ liftIO $ atomically $ swapTMVar v st
+ void $ liftIO $ atomically $ do
+ void $ tryReadTMVar v
+ putTMVar v st
{- Handle initial protocol startup; check the VERSION
- the remote sends. -}