mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-01 01:26:32 +00:00
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.