Skip to content

Commit

Permalink
[sc-92887] Fix async race condition during cleanup
Browse files Browse the repository at this point in the history
At least, from context that seems an accurate summary of what's
happening. This was recommended by @ocharles and has been working for
CircuitHub per:

jfischoff#251 (comment)
  • Loading branch information
codygman committed Sep 16, 2021
1 parent 593e3eb commit 3e3d011
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Database/Postgres/Temp/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,9 @@ start = startConfig defaultConfig
--
-- @since 1.12.0.0
stop :: DB -> IO ()
stop DB {..} =
Async.concurrently_ (stopPlan dbPostgresProcess) $ cleanupConfig dbResources
stop DB {..} = do
void $ stopPlan dbPostgresProcess
cleanupConfig dbResources

-- | Only stop the @postgres@ process but leave any temporary resources.
-- Useful for testing backup strategies when used in conjunction with
Expand Down

0 comments on commit 3e3d011

Please sign in to comment.