Skip to content

Problems with MS HttpClient #219

@kemsky

Description

@kemsky

MS HttpClient has internal handler pool, this pool uses weak references and timer to track handler garbage collection. Unfortunately it also captures DI scope while waiting for handler collection. Scope contains a reference to the parent scope and the parent scope contains a reference to the HttpClient instance (because it implements disposable), HttpClient instance obviously has a reference to the handler. As a result handlers are never collected.

Is there any way to exclude HttpClient from disposable objects?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions