diff --git a/src/client/mod.rs b/src/client/mod.rs index 091cf31..412b6e3 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -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) diff --git a/src/ts6/mod.rs b/src/ts6/mod.rs index c71b6e4..6b45c65 100644 --- a/src/ts6/mod.rs +++ b/src/ts6/mod.rs @@ -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