Skip to content

Commit db07dd1

Browse files
authored
Rollup merge of rust-lang#41499 - steveklabnik:gh25164, r=alexcrichton
Address platform-specific behavior in TcpStream::shutdown Fixes rust-lang#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.
2 parents 7067002 + 29e6656 commit db07dd1

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)