Fix memory memory leak

- Tuple to strict pair
- Self-recursive loops with more knot tying <- this was the thing
This commit is contained in:
2026-09-08 07:58:50 +03:00
parent 7b6b529120
commit 1edb2ac5a2
6 changed files with 75 additions and 59 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ subscribe bus conn ents =
-- even when no state changes arrive.
receiveLoop :: Bus -> WS.Connection -> IO Void
receiveLoop bus conn = forever $ do
winner <- race (threadDelay 1000000) (WS.receiveData conn)
winner <- race (threadDelay 1_000_000) (WS.receiveData conn)
case winner of
Left () -> atomically $ writeTChan (busInbound bus) Tick
Right msg -> case eitherDecode msg of