-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
Feature Description
There should be a way to stop the timestamp updater again so we don't leak a goroutine.
When using Uber's goleak you have to manually ignore these after shutting down the fiber server:
package handlers_test
import (
"testing"
"go.uber.org/goleak"
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(
m,
// TODO: Fix those leaks upstream
goleak.IgnoreTopFunction("time.Sleep"), // https://github.com/valyala/fasthttp/blob/0be5a4150cb0e35605cffd09e922707355dbdec3/fs.go#L477-L480
goleak.IgnoreTopFunction("github.com/gofiber/fiber/v2/internal/memory.(*Storage).gc"),
goleak.IgnoreTopFunction("github.com/gofiber/fiber/v2/internal/storage/memory.(*Storage).gc"),
goleak.IgnoreTopFunction("github.com/gofiber/fiber/v2/internal/storage/memory.New.StartTimeStampUpdater.func1.1"),
goleak.IgnoreTopFunction("github.com/gofiber/fiber/v2/utils.StartTimeStampUpdater.func1.1"),
)
}Additional Context (optional)
No response
Code Snippet (optional)
No response
Checklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my suggestion prior to opening this one.
- I understand that improperly formatted feature requests may be closed without explanation.
Reactions are currently unavailable