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

use of time.After is problematic #14

Open
flowchartsman opened this issue Nov 14, 2023 · 0 comments
Open

use of time.After is problematic #14

flowchartsman opened this issue Nov 14, 2023 · 0 comments

Comments

@flowchartsman
Copy link

https://github.com/papertrail/go-tail/blob/master/follower/follower.go#L220 will create a new *time.Timer for every iteration of the event loop, and this timer will not be cleaned up until its 10 seconds expire. For busy logs, this will be a problem and could explain #9.

Recommend using time.Newtimer and stopping and resetting it as appropriate

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

No branches or pull requests

1 participant