From bb3ecf36795df288df47bb6c50cf257d266687b6 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 2 Apr 2021 19:55:31 +0100 Subject: [PATCH] Shut the Shake session on exit, instead of restarting it Restarting the session will result in progress reporting and other messages being sent to the client, which might have already closed the stream --- ghcide/src/Development/IDE/LSP/LanguageServer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide/src/Development/IDE/LSP/LanguageServer.hs b/ghcide/src/Development/IDE/LSP/LanguageServer.hs index 53a2aee1e0..06afd28245 100644 --- a/ghcide/src/Development/IDE/LSP/LanguageServer.hs +++ b/ghcide/src/Development/IDE/LSP/LanguageServer.hs @@ -188,7 +188,7 @@ exitHandler :: IO () -> LSP.Handlers (ServerM c) exitHandler exit = LSP.notificationHandler SExit $ const $ do (_, ide) <- ask -- flush out the Shake session to record a Shake profile if applicable - liftIO $ restartShakeSession (shakeExtras ide) [] + liftIO $ shakeShut ide liftIO exit modifyOptions :: LSP.Options -> LSP.Options