From d00ce82418d96f00772fcd66c0c4c528a424fc55 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Aug 2020 12:20:07 -0400 Subject: [PATCH] fix hang if external program is not available startExternal' throws an exception, which left the externalAsync TMVar empty, so the next try to use it would hang. --- Remote/External.hs | 1 + ...te_with_external_remote_hangs_after_asyncexternal_merge.mdwn | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Remote/External.hs b/Remote/External.hs index 41d6c351f7..729e166893 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -616,6 +616,7 @@ startExternal external = liftIO (atomically $ takeTMVar (externalAsync external)) >>= \case UncheckedExternalAsync -> do (st, extensions) <- startExternal' external + `onException` store UncheckedExternalAsync if asyncExtensionEnabled extensions then do relay <- liftIO $ runRelayToExternalAsync external st diff --git a/doc/bugs/testremote_with_external_remote_hangs_after_asyncexternal_merge.mdwn b/doc/bugs/testremote_with_external_remote_hangs_after_asyncexternal_merge.mdwn index 48cccfcae2..6d3ab6d0b1 100644 --- a/doc/bugs/testremote_with_external_remote_hangs_after_asyncexternal_merge.mdwn +++ b/doc/bugs/testremote_with_external_remote_hangs_after_asyncexternal_merge.mdwn @@ -56,3 +56,5 @@ With the first commit before the merge checked out (0900bb2ca), the [[!meta author=kyle]] [[!tag projects/datalad]] + +> [[fixed|done]] thanks for reporting --[[Joey]] -- 2.30.2