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
262
262
shutdownHandler recorder stopReactor = LSP. requestHandler SMethod_Shutdown $ \ _ resp -> do
263
263
(_, ide) <- ask
264
264
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
+
267
268
-- flush out the Shake session to record a Shake profile if applicable
268
269
liftIO $ shakeShut ide
270
+ -- stop the reactor to free up the hiedb connection
271
+ liftIO stopReactor
269
272
resp $ Right Null
270
273
271
274
exitHandler :: IO () -> LSP. Handlers (ServerM c )
You can’t perform that action at this time.
0 commit comments