Skip to content

Commit 29e6656

Browse files
committed
Address platform-specific behavior in TcpStream::shutdown
Fixes #25164
1 parent 15ce540 commit 29e6656

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/net/tcp.rs

+7
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ impl TcpStream {
177177
///
178178
/// [`Shutdown`]: ../../std/net/enum.Shutdown.html
179179
///
180+
/// # Platform-specific behavior
181+
///
182+
/// Calling this function multiple times may result in different behavior,
183+
/// depending on the operating system. On Linux, the second call will
184+
/// return `Ok(())`, but on macOS, it will return `ErrorKind::NotConnected`.
185+
/// This may change in the future.
186+
///
180187
/// # Examples
181188
///
182189
/// ```no_run

0 commit comments

Comments
 (0)