fix: don't panic on empty newlines
All checks were successful
build / test-alpine (push) Successful in 50s
build / test-debian (push) Successful in 1m26s

This commit is contained in:
user0-07161 2026-02-15 21:52:12 +01:00
parent 0682ff9ff4
commit 4b96f57f44
2 changed files with 12 additions and 0 deletions

View file

@ -57,6 +57,12 @@ impl Client {
}
}
match &buffer as &str {
"\n" | "\r\n" => return Ok(TcpListenerResult::UpdatedUser(user_state)),
_ => {}
}
let command = commands::ClientCommand::new(buffer.clone()).await;
match command
.execute(&mut writer, &info.server_hostname, &mut user_state, info)

View file

@ -103,6 +103,12 @@ impl Ts6 {
}
}
match &buffer as &str {
"\n" | "\r\n" => return Ok(self_clone),
_ => {}
}
debug!("received command on ts6 connection: {buffer}");
let args = buffer