Skip to content

New undisposed instance of httpclient per request #13

@shmatt

Description

@shmatt

Hi,

I seem to be having trouble on multiple projects with failing to get a connection after my app has been running for a while.

I haven't got to the root cause yet, but I'm wondering if it is because the BaseProxy creates a new HttpClient for each request, and does not dispose of it. From what I understand, HttpClient should either be used as a singleton, or disposed of after each use (https://stackoverflow.com/questions/15705092/do-httpclient-and-httpclienthandler-have-to-be-disposed). I've also read elsewhere that this becomes a particular problem if keep-alive is used (which is used by default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions