Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timeout CLI option #41

Merged
merged 1 commit into from
Feb 16, 2021
Merged

Add a timeout CLI option #41

merged 1 commit into from
Feb 16, 2021

Conversation

hug-dev
Copy link
Member

@hug-dev hug-dev commented Feb 16, 2021

Adds a way to change the client's timeout on the command line.

@hug-dev hug-dev requested a review from ionut-arm February 16, 2021 15:56
Copy link
Member

@ionut-arm ionut-arm left a comment

Choose a reason for hiding this comment

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

👍🏻

Comment on lines +34 to +35
if let Some(timeout) = matches.timeout {
let timeout = if timeout == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if let Some(timeout) = matches.timeout {
let timeout = if timeout == 0 {
if let Some(0) = matches.timeout {

src/main.rs Outdated
let timeout = if timeout == 0 {
None
} else {
Some(std::time::Duration::new(timeout.into(), 0))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Some(std::time::Duration::new(timeout.into(), 0))
Some(std::time::Duration::from_secs(timeout.into()))

Adds a way to change the client's timeout on the command line.

Signed-off-by: Hugues de Valon <[email protected]>
@hug-dev hug-dev merged commit 530e6a3 into parallaxsecond:master Feb 16, 2021
@hug-dev hug-dev deleted the timeout branch February 16, 2021 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants