forked from M-Labs/nac3
comms: add comment about closed connection handling
This commit is contained in:
parent
11b58d801d
commit
bca2b3fe50
|
@ -111,7 +111,9 @@ async fn handle_connection(stream: &TcpStream, control: Rc<RefCell<kernel::Contr
|
||||||
Ok(true) => {}
|
Ok(true) => {}
|
||||||
Ok(false) =>
|
Ok(false) =>
|
||||||
return Err(Error::UnexpectedPattern),
|
return Err(Error::UnexpectedPattern),
|
||||||
// peer has closed the connection
|
// Peer has closed the connection.
|
||||||
|
// Closing here is a normal condition so do not reported an error.
|
||||||
|
// An error is still reported if the connection is unexpectedly closed elsewhere.
|
||||||
Err(smoltcp::Error::Illegal) =>
|
Err(smoltcp::Error::Illegal) =>
|
||||||
return Ok(()),
|
return Ok(()),
|
||||||
Err(e) =>
|
Err(e) =>
|
||||||
|
|
Loading…
Reference in New Issue