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 condition at startup #142

Merged
merged 2 commits into from Mar 9, 2019

Conversation

jsvd
Copy link
Contributor

@jsvd jsvd commented Mar 8, 2019

currently the socket was being opened during register but the queue is only set during run, which mean that connections+data could arrive before the a queue was configured, causing the error seen in the linked issue.

This PR changes the socket opening to also happen during run.

solves #132

@elasticsearch-bot elasticsearch-bot self-assigned this Mar 8, 2019
Copy link
Contributor

@danhermann danhermann left a comment

Choose a reason for hiding this comment

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

LGTM pending successful CI

@jsvd
Copy link
Contributor Author

jsvd commented Mar 9, 2019

One test wasn't taking into account the move of binding the socket from #register to #run, fixed now.

@jsvd jsvd merged commit 58d804b into logstash-plugins:master Mar 9, 2019
jsvd added a commit that referenced this pull request Mar 9, 2019
currently the socket was being opened during `register` but the queue is only set during `run`, which mean that connections+data could arrive before the a queue was configured, causing the error seen in the linked issue.

This commit changes the socket opening to also happen during `run`.
Also fixes testing now that bind happens during `run`.

solves #132
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

3 participants