Skip to content

Commit

Permalink
Merge pull request #1278 from microsoft/bugfix-catnapw-close
Browse files Browse the repository at this point in the history
[catnapw] Enforce Close on ENOTCONN
  • Loading branch information
ppenna committed May 15, 2024
2 parents ffaf885 + 0613c8c commit c420595
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rust/catnap/win/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ impl NetworkTransport for SharedCatnapTransport {
}
.await
{
Err(err) if err.errno == libc::ENOTCONN => socket.shutdown(),
Err(err) if err.errno == libc::ENOTCONN => {
match socket.shutdown() {
Err(err) if err.errno == libc::ENOTCONN => Ok(()),
r => r,
}
},
r => r,
}
}
Expand Down

0 comments on commit c420595

Please sign in to comment.