mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 11:17:26 +03:00
8296e03d86
std::net: clamp linger timeout value to prevent silent truncation. Duration::as_secs() returns u64 but l_linger field type is narrower, c_int on most unix platforms, c_ushort on cygwin and windows. clamping before the cast, consistent with how set_timeout handles this.