Skip to content

Best practice to dispose SignalR HubConnection #13771

Open

Description

@jasonycw

Is there a best practice or suggestion for how to stop/dispose HubConnection?

Since there is no IDisposable for HubConnection, we cannot use using, any suggestion if we need to use StopAsync and DisposeAsync explicitly?

Any performance impact to use or not to use StopAsync and DisposeAsync?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. added
    Source - Docs.ms
    on Aug 12, 2019
  2. added this to the Backlog milestone on Aug 13, 2019
  3. sommmen commented on Jan 15, 2020

    @sommmen

    I am very much interested in this aswell.
    I tried calling stopasync and dispose but i still get a 'socked disconnected forecefully' on the hub server.

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

    SignalRSource - Docs.msdoc-enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions