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 Retry #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add Retry #28

wants to merge 2 commits into from

Conversation

waigani
Copy link
Owner

@waigani waigani commented Oct 20, 2020

No description provided.

@waigani
Copy link
Owner Author

waigani commented Oct 20, 2020

@codelingo review

@codelingo
Copy link

codelingo bot commented Oct 20, 2020

Running fresh review.

CodeLingoBot help

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

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

2 issues found.

delay = 10 * time.Second
}
select {
case <-time.After(delay):
Copy link

Choose a reason for hiding this comment

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

Make one ticker as opposed to making a new timer each iteration.

View Rule

Copy link
Owner Author

Choose a reason for hiding this comment

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

@codelingo It'd be helpful if the comment explained a bit more of the why here: you're essentially avoiding a mem leak as a new timer object is created on each iteration.

Copy link

Choose a reason for hiding this comment

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

delay = 10 * time.Second
}
select {
case <-time.After(delay):
Copy link

Choose a reason for hiding this comment

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

Make one ticker as opposed to making a new timer each iteration.

View Rule

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.

1 participant