Skip to content

A big MaxIdleConnDuration value results in a very large number of zombie goroutines #2171

Description

@ShamilC137

Assume that you have fasthttp.Client with this config:

client := fasthttp.Client{
    MaxIdleConnDuration: time.Minute*5,
    // ...
}

when the server shuts down, we have a problem with go connsCleaner, which is started before connection is resolved. There is no actual connection due to the error, but we have goroutine that waits MaxIdleTimeoutDuration before runs out.
Perhaps is reasonable to move running the cleanup function after checking for errors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working as expected

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions