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 Timeout to SmbClientGetter to go-getter/v2 #369

Merged
merged 2 commits into from Jul 7, 2022

Conversation

nywilken
Copy link
Member

@nywilken nywilken commented Jun 6, 2022

Allow caller to configure a command execution context with a default timeout for all smbclient CLI operations.

Related to: #361

Allow caller to configure a command execution context with a default
timeout for all smbclient CLI operations.
@nywilken nywilken changed the base branch from main to v2 June 6, 2022 22:06
@nywilken nywilken changed the title nywilken/add smbgetter timeout Add Timeout to SmbClientGetter Jun 6, 2022
@nywilken nywilken requested a review from sylviamoss June 6, 2022 22:08
@nywilken nywilken changed the title Add Timeout to SmbClientGetter Add Timeout to SmbClientGetter to go-getter/v2 Jun 7, 2022
Copy link
Member

@sylviamoss sylviamoss left a comment

Choose a reason for hiding this comment

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

Ohh, nice catch! Good idea adding timeout to this getter as well!

@@ -222,6 +222,10 @@ func (g *SmbClientGetter) smbclientCmdArgs(used *url.Userinfo, hostPath string,
baseCmd = append(baseCmd, hostPath)
baseCmd = append(baseCmd, "--directory")
baseCmd = append(baseCmd, fileDir)
if g.Timeout > 0 {
baseCmd = append(baseCmd, "-t")
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

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.

None yet

2 participants