fix: do not close the connection on an empty line
This commit is contained in:
parent
0682ff9ff4
commit
51b38322f4
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ impl Client {
|
|||
let mut writer = TokioBufWriter::new(TokioTcpStream::from_std(stream.try_clone()?)?);
|
||||
|
||||
match reader.read_line(&mut buffer).await {
|
||||
Ok(0) => return Err(ListenerError::ConnectionError),
|
||||
Ok(0) => return Ok(TcpListenerResult::UpdatedUser(user_state)),
|
||||
Ok(_) => {}
|
||||
|
||||
Err(_) => {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ impl Ts6 {
|
|||
let mut writer = TokioBufWriter::new(TokioTcpStream::from_std(stream.try_clone()?)?);
|
||||
|
||||
match reader.read_line(&mut buffer).await {
|
||||
Ok(0) => anyhow::bail!(""),
|
||||
Ok(0) => return Ok(self_clone),
|
||||
Ok(_) => {}
|
||||
|
||||
Err(_) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue