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

preserve ctx when dialing unix socket for desktop #1475

Merged

Conversation

James-Pickett
Copy link
Contributor

@James-Pickett James-Pickett commented Nov 27, 2023

we see a lot of errors communicating over desktop socket, I don't know if properly passing the context will help with that, but seems correct either way

@James-Pickett James-Pickett marked this pull request as ready for review November 27, 2023 18:46
zackattack01
zackattack01 previously approved these changes Nov 27, 2023
Copy link
Contributor

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Seems reasonable. one question

@@ -9,7 +9,8 @@ import (
)

func dialContext(socketPath string) func(_ context.Context, _, _ string) (net.Conn, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the return need ctx? I'm not really sure how named vars work here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, so I added just incase, it shouldn't hurt anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, nvm, it's not needed

https://go.dev/play/p/BPUDbYv-slf

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for checking

@James-Pickett James-Pickett added this pull request to the merge queue Nov 28, 2023
Merged via the queue into kolide:main with commit aa15272 Nov 28, 2023
24 checks passed
@James-Pickett James-Pickett deleted the james/preserve-ctx-desktop-dialer branch November 28, 2023 15:51
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.

4 participants