Skip to content

Commit a447a4f

Browse files
committed
fix(server): withAsync would cancel the thread, no need to cancel it again.
1 parent 067cc17 commit a447a4f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lsp/src/Language/LSP/Server/Control.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ runServerWith ioLogger logger clientIn clientOut serverDefinition = do
158158
r <- race (wait _sendAsync) (threadDelay 3_000_000)
159159
case r of
160160
Left _ -> pure ()
161-
Right _ -> do
162-
ioLogger <& SenderShutdownTimeout `WithSeverity` Warning
163-
cancel _sendAsync
161+
Right _ -> ioLogger <& SenderShutdownTimeout `WithSeverity` Warning
164162
ioLogger <& ServerStopped `WithSeverity` Info
165163
return res
166164

0 commit comments

Comments
 (0)