Skip to content

Commit

Permalink
stop doing action before handler after shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpj authored and soulomoon committed Apr 8, 2024
1 parent 1e5940b commit e63e1e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lsp/src/Language/LSP/Server/Processing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,15 @@ handle' ::
TClientMessage meth ->
m ()
handle' logger mAction m msg = do
maybe (return ()) (\f -> f msg) mAction
shutdown <- isShuttingDown

when (not shutdown) $ maybe (return ()) (\f -> f msg) mAction

dynReqHandlers <- getsState resRegistrationsReq
dynNotHandlers <- getsState resRegistrationsNot

env <- getLspEnv
let Handlers{reqHandlers, notHandlers} = resHandlers env
shutdown <- isShuttingDown

case splitClientMethod m of
-- See Note [Shutdown]
Expand Down

0 comments on commit e63e1e0

Please sign in to comment.