Skip to content
Snippets Groups Projects
Commit ebb0b951 authored by Bright Open Jo's avatar Bright Open Jo
Browse files

#13 maybe fix

read more input
parent b10810bf
No related branches found
No related tags found
No related merge requests found
Pipeline #459293298 passed with warnings
Pipeline: Samotop

#459298302

    ......@@ -62,15 +62,15 @@ impl SessionService for PrudentService {
    {
    Box::pin(async move {
    if let Some(delay) = self.config.wait_for_banner_delay {
    let mut buf = [0u8];
    let mut buf = [0u8; 425];
    use async_std::io::ReadExt;
    match io.read(&mut buf[..]).timeout(delay).await {
    Some(Ok(0)) => {
    // this just looks like the client gave up and left
    warn!("{} touch and go!", state.session.connection.peer_addr)
    }
    Some(Ok(_)) => {
    state.session.input.push(buf[0]);
    Some(Ok(len)) => {
    state.session.input.extend_from_slice(&buf[0..len]);
    state.session.say_shutdown_processing_err(
    "Client sent commands before banner".into(),
    );
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment