Address platform-specific behavior in TcpStream::shutdown

Fixes #25164
This commit is contained in:
steveklabnik 2017-04-24 07:20:16 -04:00
parent 15ce54096a
commit 29e6656859
1 changed files with 7 additions and 0 deletions

View File

@ -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