From fcad6bcf2f0b1fc2b4e3d041cff8e16cd9df022f Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Mon, 18 Sep 2023 15:08:05 +0200 Subject: [PATCH] Race between sending and receiving ws messages --- hydraw/app/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydraw/app/Main.hs b/hydraw/app/Main.hs index 1d0a9fd317e..a82999c8ac9 100644 --- a/hydraw/app/Main.hs +++ b/hydraw/app/Main.hs @@ -66,7 +66,7 @@ websocketApp :: Host -> WS.PendingConnection -> IO () websocketApp host pendingConnection = do frontend <- WS.acceptRequest pendingConnection withClient host $ \backend -> - concurrently_ + race_ (forever $ WS.receive frontend >>= WS.send backend) (forever $ WS.receive backend >>= WS.send frontend)