Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

VaultHttpClient is not thread safe #19

@amitisss

Description

@amitisss

When creating VaultHttpClient in multi threaded environment a System.InvalidOperationException is thrown.

Please Refer to the attached exception log.

Steps to reproduce:

Initialize VaultHttpClient in parallel using several threads.

Solution:

Initialize the VaultHttpClient* in a static block:

    static VaultHttpClient()
    {
        HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
    }

VaultHttpClient.Exception.log

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