From 29e6656859f19a1cb5bd1672b9369acef98d1862 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Mon, 24 Apr 2017 07:20:16 -0400 Subject: [PATCH] Address platform-specific behavior in TcpStream::shutdown Fixes #25164 --- src/libstd/net/tcp.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index bc315d54100e4..8def11295fda8 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