From bca2b3fe5086fb1ff60bcdc8717e6066c7753dc8 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 2 May 2020 11:44:10 +0800 Subject: [PATCH] comms: add comment about closed connection handling --- src/runtime/src/comms.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 1232e29..da0c19b 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -111,7 +111,9 @@ async fn handle_connection(stream: &TcpStream, control: Rc {} Ok(false) => 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) => return Ok(()), Err(e) =>