Skip to content

The client should reuse HttpClient for negotiate and start requests #3829

@moozzyk

Description

@moozzyk

Expected behavior

SignalR client reuses the same HttpClient for negotiate and start requests. All SSE and LongPolling connect/poll requests should use the same httpClient for long running requests

Actual behavior

SignalR client calls IHttpClient.Initialize before sending negotiate and start requests. The DefaultHttpClient creates httpClient in the Initialize method. Since start can be sent only after negotiate initializing the IHttpClient when starting the request should not be needed. Currently it resets the clients that were used to send the negotiate (which is short running) and connect (which is long running) requests. This may result in breaking sticky sessions in load balancers.

Steps to reproduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions