From 7a937355d248249aca5d80a32adb74a820f54fd4 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Mon, 18 Nov 2019 17:13:32 +0100 Subject: [PATCH] Stop sending an error and simply ignore relay from an unauthenticated player because that should only happen on immediate logout for which there's nothing to do --- src/Messaging.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Messaging.hs b/src/Messaging.hs index fecbb9a..e966dea 100644 --- a/src/Messaging.hs +++ b/src/Messaging.hs @@ -57,10 +57,9 @@ broadcast obj = do relay :: FromClient -> (Message.T -> App.T ()) -> App.T () relay message f = do App.debug "Relaying" - maybe bounce doRelay . Session.player =<< App.session + maybe (return ()) doRelay . Session.player =<< App.session where doRelay player = f $ Relay {from = playerID player, message} - bounce = send (Error "Unidentified client can't relay messages") receive :: App.T FromClient receive = do