Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon committed Apr 10, 2024
1 parent a438b4b commit d933651
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lsp/src/Language/LSP/Server/Processing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,13 @@ handle' ::
handle' logger mAction m msg = do
shutdown <- isShuttingDown
-- These are the methods that we are allowed to process during shutdown.
-- The reason that we include 'shutdown' itself here is because we change
-- state to "shutting down" just _before_ we process the message itself!
-- The reason that we do not include 'shutdown' itself here is because
-- by the time we get the first 'shutdown' message, isShuttingDown will
-- still be false, so we would still be able to process it.
-- This ensures we won't process the second 'shutdown' message and only
-- process 'exit' during shutdown.
let allowedMethod m = case (splitClientMethod m, m) of
(IsClientNot, SMethod_Exit) -> True
-- we do not allow SMethod_Shutdown to be called during shutdown
_ -> False

case mAction of
Expand Down

0 comments on commit d933651

Please sign in to comment.