diff --git a/src-client/Client/Communication.hs b/src-client/Client/Communication.hs index 7318740..1df0c28 100644 --- a/src-client/Client/Communication.hs +++ b/src-client/Client/Communication.hs @@ -53,7 +53,7 @@ sendMessage st msg sock = do (\ptr -> do eResult <- try $ sendBuf sock ptr (VS.length msgVector) case eResult of - Left (_ :: IOException) -> gracefulExit st "Quitting due to connection loss…" + Left (_ :: IOException) -> gracefulExit st "sendMessage: Quitting due to connection loss…" Right _ -> pure () ) @@ -64,7 +64,7 @@ handleMessages = do msgs <- liftIO $ STM.atomically $ STM.flushTQueue queue mapM_ (\msg -> do - liftIO $ print msg + liftIO $ putStrLn $ "handling following: " <> show msg handleMessage msg ) msgs @@ -153,14 +153,14 @@ terminateGameOnSigint = do void $ liftIO $ installHandler keyboardSignal (CatchOnce $ do - putStrLn "SIGINT caught, terminating…" + putStrLn "receiveMessage: SIGINT caught, terminating…" STM.atomically $ do currentState <- STM.readTMVar clientState void $ STM.swapTMVar clientState $ currentState { clientStop = True } -- Vty.shutdown (clientVty currentState) partingMessage st clientId sock -- Raise SIGINT again so it does not get blocked - -- raiseSignal keyboardSignal + raiseSignal keyboardSignal ) Nothing