warn instead of erroring when a client fails to send an authentication request
This commit is contained in:
parent
7b9582d518
commit
2e8496ae37
@ -10,7 +10,7 @@ use tokio::{
|
||||
sync::Mutex,
|
||||
time::{sleep, timeout},
|
||||
};
|
||||
use tracing::{info, instrument, trace};
|
||||
use tracing::{info, instrument, trace, warn};
|
||||
|
||||
use crate::{
|
||||
auth::dyn_ip_update,
|
||||
@ -329,6 +329,12 @@ pub async fn handler(
|
||||
};
|
||||
res?;
|
||||
|
||||
if packet.kind() != PacketKind::RemConfirm {
|
||||
let kind = packet.kind();
|
||||
warn!(%addr, ?kind, "client sent unexpected packet instead of RemConnect");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let RemConnect { number, pin } = packet.as_rem_connect()?;
|
||||
|
||||
handler_metadata.number = Some(number);
|
||||
|
@ -256,7 +256,10 @@ async fn connection_handler(
|
||||
}
|
||||
_ => Some(err.to_string()),
|
||||
},
|
||||
Ok(Ok(())) => None,
|
||||
Ok(Ok(())) => {
|
||||
debug!(%addr, "finished handling client");
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(error) = error {
|
||||
|
Loading…
Reference in New Issue
Block a user