Skip to content

Commit 30ff20d

Browse files
committed
1 parent d648012 commit 30ff20d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/curl.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function set_low_speed_limits(easy::Curl.Easy, low_speed_limit, low_speed_time)
166166
low_speed_time >= 0 ||
167167
throw(ArgumentError("`low_speed_time` must be non-negative, got $(low_speed_time)."))
168168

169-
_max = typemax(Clong)
169+
_max = typemax(Clong) ÷ 1000
170170
low_speed_limit = low_speed_limit <= _max ? round(Clong, low_speed_limit) : _max
171171
low_speed_time = low_speed_time <= _max ? round(Clong, low_speed_time) : _max
172172

@@ -182,8 +182,7 @@ function set_connect_timeout(easy::Curl.Easy, timeout::Real)
182182
timeout_ms = round(Clong, timeout * 1000)
183183
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, timeout_ms)
184184
else
185-
timeout = timeout  typemax(Clong) ? round(Clong, timeout) : Clong(0)
186-
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT, timeout)
185+
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT, Clong(0))
187186
end
188187
end
189188

0 commit comments

Comments
 (0)