about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsteveklabnik <steve@steveklabnik.com>2017-04-24 07:20:16 -0400
committersteveklabnik <steve@steveklabnik.com>2017-04-26 05:30:35 -0400
commit29e6656859f19a1cb5bd1672b9369acef98d1862 (patch)
tree2ba40fcaf796e51279e774ba2aca2e9b5ee2d651
parent15ce54096a589de277771ad1f55a334fe2661a64 (diff)
downloadrust-29e6656859f19a1cb5bd1672b9369acef98d1862.tar.gz
rust-29e6656859f19a1cb5bd1672b9369acef98d1862.zip
Address platform-specific behavior in TcpStream::shutdown
Fixes #25164
-rw-r--r--src/libstd/net/tcp.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs
index bc315d54100..8def11295fd 100644
--- a/src/libstd/net/tcp.rs
+++ b/src/libstd/net/tcp.rs
@@ -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