dotnet / dotnet/aspnetcore

JS SignalR - HubConnection - Ability to unregister callbacks for connection states.

Open
#36,793 0 comments 3 reactions 0 assignees View on GitHub
area-signalr enhancement Needs: Design
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

I was writing an internal plugin when I realized that there is no way to remove a callback added via `onreconnected`, save for creating a whole new hub connection. It could be useful to be able to add and remove temporary callbacks. For example inside a certain page, do some extra work if the connection is reestablished, unregister it before leaving the page.

The only workaround for now would be to have a single callback that would call from an array that I can modify, though it would be nicer if signalR provided a method.

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.