reduce debug output

This commit is contained in:
nek0 2024-05-01 22:42:49 +02:00
parent 9b164e4f65
commit 9a2786fa2d
3 changed files with 5 additions and 5 deletions

View file

@ -59,7 +59,7 @@ handleMessages = do
msgs <- liftIO $ STM.atomically $ STM.flushTQueue queue
mapM_
(\msg -> do
liftIO $ putStrLn $ "Handling following: " <> show msg
-- liftIO $ putStrLn $ "Handling following: " <> show msg
handleMessage msg
)
msgs

View file

@ -112,7 +112,7 @@ dropClient clientList sock = do
maybe
(putStrLn $ "closing unknown socket: " <> show sock)
(\client -> do
putStrLn $ "dropping client: " <> show (ccUUID client)
putStrLn $ "dropping client: " <> show (fromJust $ ccUUID client)
killThread (ccListener client)
)
mclient
@ -156,7 +156,7 @@ sendMessage msg uuid clientList = do
let mSock = ccSocket <$> find (\client -> ccUUID client == Just uuid) clients
msgJson = A.encode msg
msgVector = VS.fromList $ B.unpack $ B.toStrict $ ('<' `B8.cons` (msgJson `B8.snoc` '>'))
putStrLn $ "Sending: " <> B8.unpack msgJson
-- putStrLn $ "Sending: " <> B8.unpack msgJson
maybe
(putStrLn $ "unknown client UUID: " <> show uuid)
(\sock ->
@ -235,7 +235,7 @@ handleMessage
handleMessage stateContainer readerContainer msg = do
let clientList = scClientSockets stateContainer
clients <- liftIO $ STM.atomically $ STM.readTMVar clientList
putStrLn $ "Handling: " <> show msg
-- putStrLn $ "Handling: " <> show msg
case msg of
IdRequest -> do
clientId <- nextRandom

View file

@ -35,7 +35,7 @@ runGame = do
before <- gets scServerLastTick
now <- liftIO getCurrentTime
let delta = realToFrac $ diffUTCTime now before
liftIO $ B8.hPutStr stdout $ "tick: " <> fromString (show delta) <> " \r"
-- liftIO $ B8.hPutStr stdout $ "tick: " <> fromString (show delta) <> " \r"
handleMessages
updateSpawners delta
updateWizards delta