Add a message to explain why connection are closed in case of invalid player names
This commit is contained in:
parent
9a38a634eb
commit
25871de084
@ -152,6 +152,7 @@ impl Actor for HumanPlayerWS {
|
||||
fn started(&mut self, ctx: &mut Self::Context) {
|
||||
// Check player name length
|
||||
if self.name.len() < MIN_PLAYER_NAME_LENGTH || self.name.len() > MAX_PLAYER_NAME_LENGTH {
|
||||
log::error!("Close connection due to invalid user name!");
|
||||
ctx.stop();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user