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

fix race read while running proxy #2

Merged
merged 3 commits into from
Feb 15, 2021

Conversation

euiko
Copy link
Contributor

@euiko euiko commented Feb 11, 2021

Look like the #1 are caused by we are read the same buffer with the exec.Cmd are internally using to write the buffer,
In order to avoid race this PR just copy the buffer before pass it into chan for reading.

Copy link
Owner

@galihrivanto galihrivanto left a comment

Choose a reason for hiding this comment

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

LGTM, works to prevent race condition
please address comment and its good to merge

@galihrivanto galihrivanto merged commit 558bd0a into galihrivanto:master Feb 15, 2021
@galihrivanto
Copy link
Owner

thank you

@euiko euiko deleted the fix-race-read-while-running branch February 16, 2021 10:49
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