about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2017-04-26 22:11:05 +0000
committerGitHub <noreply@github.com>2017-04-26 22:11:05 +0000
commit84f6e017d64954d39c827123befaa8299a819ea4 (patch)
tree2cf324d18f595e465a0f99fe57c511a4e98ba0d6 /src/libstd
parent25834dcb9b739ec6541ddfb591e6d345fda0474d (diff)
parent29e6656859f19a1cb5bd1672b9369acef98d1862 (diff)
downloadrust-84f6e017d64954d39c827123befaa8299a819ea4.tar.gz
rust-84f6e017d64954d39c827123befaa8299a819ea4.zip
Rollup merge of #41499 - steveklabnik:gh25164, r=alexcrichton
Address platform-specific behavior in TcpStream::shutdown

Fixes #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.
Diffstat (limited to 'src/libstd')
-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