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
This commit is contained in:
parent
3bd2829cf2
commit
7a937355d2
1 changed files with 1 additions and 2 deletions
|
@ -57,10 +57,9 @@ broadcast obj = do
|
||||||
relay :: FromClient -> (Message.T -> App.T ()) -> App.T ()
|
relay :: FromClient -> (Message.T -> App.T ()) -> App.T ()
|
||||||
relay message f = do
|
relay message f = do
|
||||||
App.debug "Relaying"
|
App.debug "Relaying"
|
||||||
maybe bounce doRelay . Session.player =<< App.session
|
maybe (return ()) doRelay . Session.player =<< App.session
|
||||||
where
|
where
|
||||||
doRelay player = f $ Relay {from = playerID player, message}
|
doRelay player = f $ Relay {from = playerID player, message}
|
||||||
bounce = send (Error "Unidentified client can't relay messages")
|
|
||||||
|
|
||||||
receive :: App.T FromClient
|
receive :: App.T FromClient
|
||||||
receive = do
|
receive = do
|
||||||
|
|
Loading…
Reference in a new issue