Skip to content

Commit

Permalink
Race between sending and receiving ws messages
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch authored and Arnaud Bailly committed Oct 19, 2023
1 parent fa82bbd commit fcad6bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hydraw/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit fcad6bc

Please sign in to comment.