Skip to content

Commit f4ccd52

Browse files
authored
fix error message, bump patch version (#32)
Fixed error message for connect timeout validation. Bumped patch version for tagging
1 parent eeb28a3 commit f4ccd52

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "gRPCClient"
22
uuid = "aaca4a50-36af-4a1d-b878-4c443f2061ad"
33
authors = ["Tanmay K.M. <[email protected]>"]
4-
version = "0.1.3"
4+
version = "0.1.4"
55

66
[deps]
77
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

src/curl.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ function recv_data(easy::Curl.Easy, output::Channel{T}, max_recv_message_length:
215215
end
216216

217217
function set_connect_timeout(easy::Curl.Easy, timeout::Real)
218-
(0 timeout (typemax(Clong) ÷ 1000)) ||
219-
throw(ArgumentError("timeout must be positive, got $timeout"))
218+
maxval = typemax(Clong) ÷ 1000
219+
(0 timeout maxval) ||
220+
throw(ArgumentError("timeout value must be between 0 and $maxval, got $timeout"))
220221
timeout_ms = round(Clong, timeout * 1000)
221222
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, timeout_ms)
222223
end

0 commit comments

Comments
 (0)