Support closing/stopping a connection from the server side #2101

DamianEdwards opened this Issue May 29, 2013 · 7 comments


None yet
6 participants

DamianEdwards commented May 29, 2013

Add API to the server to allow stopping a connection programatically so that applications can forcibly end a connection based on custom logic.

API should support idea of a terminal close where the client should not try auto-reconnecting when it receives the stop command, as well as a close with reconnect delay, where client will wait for the amount of time passed before attempting to reconnect.

Open questions:

  • Should client reconnect be a true reconnect (preserve connection ID) or a stop/start cycle?
  • Should the API allow choosing if the client attempts a reconnect vs. full stop/start cycle?
  • Should the API allow passing a reconnect delay?

It would be nice for the client to be able to subscribe to the reconnect as an event. In that case the answer to the open questions could just be 'let the client figure it out'. Would you agree?

I'm very much looking forward to this feature, as it would probably solve an issue I'm having, as described on Stack Overflow.


davidfowl commented Jun 20, 2013

Moving this to post 2.0.0 beta as it will cause too much churn.

It's really a good idea! I need this functionality.

To your question, I think you need even so have separate functions for this.

But on the other hand, we can not know how to implement client (client for android or ios) but disable this client no longer needed we need. In this mostly seems to me - it's close connections of the server.

st04 commented Mar 26, 2014

Is there any indication as to when this functionality will be integrated in to SignalR?


davidfowl commented Mar 26, 2014

Nope, we have a large backlog and this currently isn't on that list.


DamianEdwards commented Jun 24, 2014

We'll move this to the new repo as a candidate for v3 or beyond.

DamianEdwards added the v3 label Jun 24, 2014

With you guys working on SignalR again and released 2.2.1 recently would this be considered to be looked at before V3 .NET Core version?

As was hoping if a certain event happened for a specific user. Such as log out then I could force the connection to terminate/close from the server for that user/connection or would there be an alternative approach to this @DamianEdwards or @davidfowl ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment