We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f9c8974 + 50e7cf0 commit 19dccedCopy full SHA for 19dcced
docs/src/patterns/accept-loop.md
@@ -121,10 +121,10 @@ async fn accept_loop(addr: impl ToSocketAddrs) -> Result<()> {
121
let listener = TcpListener::bind(addr).await?;
122
let mut incoming = listener.incoming();
123
while let Some(result) = incoming.next().await {
124
- let stream = match stream {
+ let stream = match result {
125
Err(ref e) if is_connection_error(e) => continue, // 1
126
Err(e) => {
127
- eprintln!("Error: {}. Pausing for 500ms."); // 3
+ eprintln!("Error: {}. Pausing for 500ms.", e); // 3
128
task::sleep(Duration::from_millis(500)).await; // 2
129
continue;
130
}
0 commit comments