Skip to content

Commit 91c4104

Browse files
committed
Try this
1 parent dea0d14 commit 91c4104

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import qualified Colog.Core as L
1919
import Colog.Core (LogAction (..), WithSeverity (..), Severity (..), (<&), cmap)
2020
import qualified Control.Concurrent.Async as Async
2121
import Control.Concurrent.STM.TChan
22+
import Control.Concurrent (forkIO)
2223
import Control.Monad.STM
2324
import Control.Monad.IO.Class
2425
import qualified Data.Aeson as J
@@ -133,11 +134,11 @@ runServerWith ioLogger logger clientIn clientOut serverDefinition = do
133134
sendMsg
134135
recvMsg
135136

137+
_ <- forkIO serverIn
136138
-- Bind all the threads together so that any of them terminating will terminate everything
137139
_ <- Async.withAsync serverOut $ \a1 ->
138-
Async.withAsync serverIn $ \a2 ->
139140
Async.withAsync processingLoop $ \a3 ->
140-
Async.waitAny [a1, a2, a3]
141+
Async.waitAny [a1, a3]
141142

142143
ioLogger <& Stopping `WithSeverity` Info
143144
return 0

0 commit comments

Comments
 (0)