Fix windows Socket::connect_timeout
overflow
Signed-off-by: Eval EXEC <execvy@gmail.com>
This commit is contained in:
parent
e1c29d137d
commit
22f62df337
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ impl Socket {
|
|||
}
|
||||
|
||||
let mut timeout = c::timeval {
|
||||
tv_sec: timeout.as_secs() as c_long,
|
||||
tv_sec: cmp::min(timeout.as_secs(), c_long::MAX as u64) as c_long,
|
||||
tv_usec: (timeout.subsec_nanos() / 1000) as c_long,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue