Skip to content

Commit

Permalink
fix error message, bump patch version (#32)
Browse files Browse the repository at this point in the history
Fixed error message for connect timeout validation.
Bumped patch version for tagging
  • Loading branch information
tanmaykm authored Jul 20, 2022
1 parent eeb28a3 commit f4ccd52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "gRPCClient"
uuid = "aaca4a50-36af-4a1d-b878-4c443f2061ad"
authors = ["Tanmay K.M. <[email protected]>"]
version = "0.1.3"
version = "0.1.4"

[deps]
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Expand Down
5 changes: 3 additions & 2 deletions src/curl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ function recv_data(easy::Curl.Easy, output::Channel{T}, max_recv_message_length:
end

function set_connect_timeout(easy::Curl.Easy, timeout::Real)
(0 timeout (typemax(Clong) ÷ 1000)) ||
throw(ArgumentError("timeout must be positive, got $timeout"))
maxval = typemax(Clong) ÷ 1000
(0 timeout maxval) ||
throw(ArgumentError("timeout value must be between 0 and $maxval, got $timeout"))
timeout_ms = round(Clong, timeout * 1000)
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, timeout_ms)
end
Expand Down

2 comments on commit f4ccd52

@tanmaykm
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/64630

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.4 -m "<description of version>" f4ccd52dc34d355e40d934d29fee3b5ef4067bc8
git push origin v0.1.4

Please sign in to comment.