Skip to content

Url can't be changed for easy reconnect #5342

Description

@benaadams

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.

Activity

  1. analogrelay commented on Oct 3, 2018

    @analogrelay
    Contributor

    We'll need to review this for all the clients.

  2. added this to the 3.0.0 milestone on Dec 17, 2018
  3. added
    area-signalr
    feature-client-net
    feature-client-java
    feature-client-javascript
    on Dec 17, 2018
  4. muratg commented on Jan 30, 2019

    @muratg
    Contributor

    cc @halter73 because I saw the word "reconnect" 😃

  5. halter73 commented on Jan 31, 2019

    @halter73
    Member

    This wouldn't affect automatic reconnects. If we want this, we should probably set up a design meeting to determine things like how the URL should be updated (e.g. a property or .start param), when it can be updated, etc...

  6. added
    enhancement
    on Mar 21, 2019
  7. 37 remaining items

  8. added
    affected-few
    severity-minor
    on Nov 6, 2020
  9. added
    help wanted
    on Apr 6, 2021
  10. added and removed
    help wanted
    on Oct 28, 2023
  11. coonmoo commented on Nov 22, 2023

    @coonmoo

    Any news on getting the .NET SignalR client to support changing the url in the reconnecting event?
    I see in the JS client this is already supported

  12. added
    help wanted
    and removed on Jan 7, 2026
  13. added theissue type on May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-fewarea-signalrblockedenhancementfeature-client-javafeature-client-javascriptfeature-client-nethelp wantedseverity-minor

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions