Closed LorenzoLeonardo closed 1 year ago
I think tests may be failing though? (perhaps because curl is too old in the container?)
I will try to use i32:MAX instead of std::i32:MAX https://doc.rust-lang.org/std/i32/constant.MAX.html
oh, that's weird, if I run the Unit Test locally this will succeed.
I believe the failure is because c_ulong
is u64 on Linux so u64::MAX
fits. I think you'll want to specify a larger amount than u64::MAX
milliseconds to guarantee failure.
will try to use from_secs() to guarantee max value
It seems there are test error not related to the change.
it is ok now
If the time that was converted into millisecond is more than the capacity of c_long, it will overflow, thus we need to convert it into seconds and use CURLOPT_CONNECTTIMEOUT.