Skip to content

Commit dea0d14

Browse files
committed
Try another thing
1 parent e9cf0e7 commit dea0d14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ runServerWith ioLogger logger clientIn clientOut serverDefinition = do
134134
recvMsg
135135

136136
-- Bind all the threads together so that any of them terminating will terminate everything
137-
serverOut `Async.race_` serverIn `Async.race_` processingLoop
137+
_ <- Async.withAsync serverOut $ \a1 ->
138+
Async.withAsync serverIn $ \a2 ->
139+
Async.withAsync processingLoop $ \a3 ->
140+
Async.waitAny [a1, a2, a3]
138141

139142
ioLogger <& Stopping `WithSeverity` Info
140143
return 0

0 commit comments

Comments
 (0)