File tree 1 file changed +4
-3
lines changed
ghcide/src/Development/IDE/Core
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)
154
154
import qualified Data.ByteString.Char8 as BS8
155
155
import Data.Coerce (coerce )
156
156
import Data.Default
157
- import Data.Foldable (toList )
157
+ import Data.Foldable (for_ , toList )
158
158
import Data.HashSet (HashSet )
159
159
import qualified Data.HashSet as HSet
160
160
import Data.String (fromString )
@@ -589,10 +589,11 @@ shakeSessionInit ide@IdeState{..} = do
589
589
logDebug (ideLogger ide) " Shake session initialized"
590
590
591
591
shakeShut :: IdeState -> IO ()
592
- shakeShut IdeState {.. } = withMVar shakeSession $ \ runner -> do
592
+ shakeShut IdeState {.. } = do
593
+ runner <- tryReadMVar shakeSession
593
594
-- Shake gets unhappy if you try to close when there is a running
594
595
-- request so we first abort that.
595
- void $ cancelShakeSession runner
596
+ for_ runner cancelShakeSession
596
597
void $ shakeDatabaseProfile shakeDb
597
598
shakeClose
598
599
progressStop $ progress shakeExtras
You can’t perform that action at this time.
0 commit comments