File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
ghcide/src/Development/IDE/LSP Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -262,10 +262,13 @@ shutdownHandler :: Recorder (WithPriority Log) -> IO () -> LSP.Handlers (ServerM
262262shutdownHandler recorder stopReactor = LSP. requestHandler SMethod_Shutdown $ \ _ resp -> do
263263 (_, ide) <- ask
264264 liftIO $ logWith recorder Debug LogServerShutdownMessage
265- -- stop the reactor to free up the hiedb connection
266- liftIO stopReactor
265+ -- we need to shut down the ide session before stopping the reactor
266+ -- since SessionIO depends on the reactor, we may hang if we stop the reactor first
267+
267268 -- flush out the Shake session to record a Shake profile if applicable
268269 liftIO $ shakeShut ide
270+ -- stop the reactor to free up the hiedb connection
271+ liftIO stopReactor
269272 resp $ Right Null
270273
271274exitHandler :: IO () -> LSP. Handlers (ServerM c )
You can’t perform that action at this time.
0 commit comments