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

Closing readers based on errors #2098

Merged
merged 1 commit into from
Jul 27, 2016
Merged

Closing readers based on errors #2098

merged 1 commit into from
Jul 27, 2016

Conversation

ruflin
Copy link
Contributor

@ruflin ruflin commented Jul 26, 2016

No description provided.

@ruflin ruflin added in progress Pull request is currently in progress. discuss Issue needs further discussion. Filebeat Filebeat labels Jul 26, 2016
select {
case <-r.done:
return
case <-timer.C:
Copy link

Choose a reason for hiding this comment

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

one can use <-time.After(r.backoff) 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.

changed

@ruflin ruflin mentioned this pull request Jul 26, 2016
@ruflin ruflin force-pushed the closing-readers branch from c98abd0 to 90d12bd Compare July 26, 2016 14:45
case <-r.done:
return
case <-time.After(r.backoff):
}
Copy link

Choose a reason for hiding this comment

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

where is wait being used? We need to distinguish be return value if done channel was closed or wait was completed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not matter, as the first thing after wait() returns is that it checks again if the channel was closed.

@ruflin ruflin force-pushed the closing-readers branch from 90d12bd to ec79118 Compare July 26, 2016 15:17
@ruflin ruflin added review and removed discuss Issue needs further discussion. in progress Pull request is currently in progress. labels Jul 26, 2016
@ruflin ruflin force-pushed the closing-readers branch from ec79118 to bb4a67c Compare July 27, 2016 08:38
@tsg tsg merged commit 33e7e3f into elastic:master Jul 27, 2016
@ruflin ruflin deleted the closing-readers branch July 27, 2016 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants