Remove thread from active list when it has finished.

Former-commit-id: 3b5a36ed001e5eae0dddb1c8f5be354662d1c02d
This commit is contained in:
David 2019-03-01 11:31:31 +01:00
commit 20ee97c53c

View file

@ -24,7 +24,7 @@ main = do
forever $ do
msg <- receiveData conn :: IO T.Text
stopWorker conn thread
putMVar thread =<< forkIO (generateResponse conn msg)
putMVar thread =<< forkIO (generateResponse conn msg >> tryTakeMVar thread >> return ())
where
opts = defaultConnectionOptions
{ connectionCompressionOptions = PermessageDeflateCompression defaultPermessageDeflate }