Skip to content

Commit 131afd3

Browse files
authored
net: clarify socket gets closed on drop (#7526)
1 parent 9ed6f70 commit 131afd3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tokio/src/net/tcp/listener.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ cfg_net! {
1919
///
2020
/// A `TcpListener` can be turned into a `Stream` with [`TcpListenerStream`].
2121
///
22+
/// The socket will be closed when the value is dropped.
23+
///
2224
/// [`TcpListenerStream`]: https://docs.rs/tokio-stream/0.1/tokio_stream/wrappers/struct.TcpListenerStream.html
2325
///
2426
/// # Errors

0 commit comments

Comments
 (0)