aboutsummaryrefslogtreecommitdiff
path: root/server/lib/Cafp/Main
diff options
context:
space:
mode:
authorJasper Van der Jeugt2020-07-31 17:13:37 +0200
committerJasper Van der Jeugt2020-07-31 17:13:37 +0200
commite3a2052522471d39e410f4ea13d51d3d18f52b80 (patch)
tree7d1500a70b22e767cc678700fc6fe3cbd7cfc9f9 /server/lib/Cafp/Main
parent323ca81c96e4186747f06b6178d71d49e98c6066 (diff)
Multiple \BLANK in black cards
Diffstat (limited to 'server/lib/Cafp/Main')
-rw-r--r--server/lib/Cafp/Main/Server.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/Cafp/Main/Server.hs b/server/lib/Cafp/Main/Server.hs
index 13b1f6b..3a99672 100644
--- a/server/lib/Cafp/Main/Server.hs
+++ b/server/lib/Cafp/Main/Server.hs
@@ -113,9 +113,10 @@ syncRoom room = do
(game, sinks) <- atomically $ (,)
<$> STM.readTVar (roomGame room)
<*> STM.readTVar (roomSinks room)
- warning $ "New state: " ++ show game
- for_ (HMS.toList sinks) $ \(pid, sink) ->
- sink . Aeson.encode . SyncGameView $ gameViewForPlayer pid game
+ for_ (HMS.toList sinks) $ \(pid, sink) -> do
+ let view = gameViewForPlayer pid game
+ warning $ "New state: " ++ show view
+ sink . Aeson.encode $ SyncGameView view
wsApp :: Server -> WS.ServerApp
wsApp server pc = case routePendingConnection pc of