File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ import Data.Aeson (toJSON)
154154import qualified Data.ByteString.Char8 as BS8
155155import Data.Coerce (coerce )
156156import Data.Default
157- import Data.Foldable (toList )
157+ import Data.Foldable (for_ , toList )
158158import Data.HashSet (HashSet )
159159import qualified Data.HashSet as HSet
160160import Data.String (fromString )
@@ -589,10 +589,11 @@ shakeSessionInit ide@IdeState{..} = do
589589 logDebug (ideLogger ide) " Shake session initialized"
590590
591591shakeShut :: IdeState -> IO ()
592- shakeShut IdeState {.. } = withMVar shakeSession $ \ runner -> do
592+ shakeShut IdeState {.. } = do
593+ runner <- tryReadMVar shakeSession
593594 -- Shake gets unhappy if you try to close when there is a running
594595 -- request so we first abort that.
595- void $ cancelShakeSession runner
596+ for_ runner cancelShakeSession
596597 void $ shakeDatabaseProfile shakeDb
597598 shakeClose
598599 progressStop $ progress shakeExtras
You can’t perform that action at this time.
0 commit comments