dotnet / dotnet/aspnetcore

Url can't be changed for easy reconnect

Open
#5,342 12 comments 2 reactions 0 assignees View on GitHub
affected-few area-signalr blocked enhancement feature-client-java feature-client-javascript feature-client-net help wanted severity-minor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

Using a client-side cursor (e.g. `lastId` processed); for a reconnect this wants to be passed back to the server in the query string (as cors doesn't allow custom headers and cors is always applicable to websockets).

However while `signalR.HubConnectionBuilder()` provides easy construction of the connection; the url cannot be changed after building.

This means if the connection disconnects and you need to pass a cursor (e.g. id); the connection has to be rebuilt and all the events re-registered to the new connection.

It would be easier if the url could be updated and only `.start` needed to be called again.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.