Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8593683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:02:55+00:00 2026-06-12T00:02:55+00:00

Take the following console app static void Main(string[] args) { Thread connector = new

  • 0

Take the following console app

    static void Main(string[] args)
    {
        Thread connector = new Thread(Connector);
        connector.Start();

        while (true)
        {
            Thread.Sleep(500);
        }
    }

    private static void Connector()
    {
        SignalR.Client.Hubs.HubConnection connection = new SignalR.Client.Hubs.HubConnection("http://192.168.42.10:1327/Chat");

        SignalR.Client.Hubs.IHubProxy loginHub = connection.CreateProxy("LoginHub");

        connection.Received += connection_Received;
        connection.Reconnected += connection_Reconnected;
        connection.StateChanged += connection_StateChanged;
        connection.Error += connection_Error;
        connection.Closed += connection_Closed;

        connection.Start().Wait();
    }

LoginHub implements IDisconnect.

If I start the app, let it connect, pull the network cable, wait for the server side disconnect event to fire, reconnect network cable, the client will reconnect and then immediately have its connection closed.

If I unplug and replug the network cable before the server side disconnect fires, the connection reconnects just fine.

Is this intended behaviour? How is reconnect supposed to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:02:57+00:00Added an answer on June 12, 2026 at 12:02 am

    EDITED (re-read and saw that I wasn’t being clear): When the client is immediately disconnected with SSE, in most cases (in 0.5.3) it will be thrown into an infinite reconnecting loop (see bug below).

    However, in some cases it will reconnect and then immediately disconnect, which is intentional behavior. The reason why we force the client to disconnect is because at this point the server has completely forgotten about the client. Therefore the client needs to re-instantiate it’s connection via the $.connection.hub.start etc.

    In the next release, we have fixed the infinite reconnect issues and have also added a “warning” to the process to notify developers that the server may be down (onConnectionSlow). Granted if you successfully reconnect and the server has forgotten about you, you will be told to then disconnect.

    Here’s the reference to the bug:
    https://github.com/SignalR/SignalR/issues/687

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Take this code: using System; namespace OddThrow { class Program { static void Main(string[]
Take the following example, I have a class public class SomeItem { public string
Take the following : #include <stdio.h> main() { unsigned long long verybig = 285212672;
Take the following property: public string Foo { get; private set; } Using reflection,
Take the following linq query: var summary = results.Select(r => new { TotalPopulation =
I have reproduced my problem in a console app. Following is the code. using
i have the following code using Nhibernate.Linq var apps = Session.Linq<History>().OrderByDescending(r => r.LastUpdated).Take(50); Console.Write(apps.Count());
Take the following code example: var myObject = {}; var i = 100; while
Take a look at the following program: class Test { List<int> myList = new
Take the following code: Sub Main() Dim i As Integer Dim b As Boolean

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.