-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🐛 [Bug]: Potential leak in sleep.go #2482
Comments
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
@hhheiaenia Have you asked in the gopsutil repo? Their sleep.go hasn't change in years. https://github.com/shirou/gopsutil/blob/master/internal/common/sleep.go |
yes, here are their fixing link: shirou/gopsutil#1475 |
Taking the issue! |
@luk3skyw4lker :-) thanks! |
Bug Description
I notice the ctx.Done() needs a cancel function to unblock the statement of ctx.Done in https://github.com/gofiber/fiber/blob/master/internal/gopsutil/common/sleep.go#L13, since the case may block forever if the case not met.
I was wondering if this may leak the goroutine where the ctx.Done() locates?
Maybe what I said is not right, thank you for taking a look.
How to Reproduce
.
Expected Behavior
.
Fiber Version
v2.40.1
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: