Skip to content

Commit

Permalink
Rollup merge of rust-lang#41499 - steveklabnik:gh25164, r=alexcrichton
Browse files Browse the repository at this point in the history
Address platform-specific behavior in TcpStream::shutdown

Fixes rust-lang#25164

r? @rust-lang/libs from the GitHub thread, it seems like documenting this behavior is okay, but I want to make sure that's what you want.
  • Loading branch information
Ariel Ben-Yehuda authored Apr 26, 2017
2 parents 865f71e + 29e6656 commit a6e6df8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libstd/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ impl TcpStream {
///
/// [`Shutdown`]: ../../std/net/enum.Shutdown.html
///
/// # Platform-specific behavior
///
/// Calling this function multiple times may result in different behavior,
/// depending on the operating system. On Linux, the second call will
/// return `Ok(())`, but on macOS, it will return `ErrorKind::NotConnected`.
/// This may change in the future.
///
/// # Examples
///
/// ```no_run
Expand Down

0 comments on commit a6e6df8

Please sign in to comment.